Show More
@@ -553,7 +553,6 b' funcs = {' | |||
|
553 | 553 | |
|
554 | 554 | # template engine |
|
555 | 555 | |
|
556 | path = ['templates', '../templates'] | |
|
557 | 556 | stringify = templatefilters.stringify |
|
558 | 557 | |
|
559 | 558 | def _flatten(thing): |
@@ -712,16 +711,10 b' class templater(object):' | |||
|
712 | 711 | |
|
713 | 712 | def templatepaths(): |
|
714 | 713 | '''return locations used for template files.''' |
|
715 | normpaths = [] | |
|
716 | for f in path: | |
|
717 | if f.startswith('/'): | |
|
718 | p = f | |
|
719 | else: | |
|
720 | fl = f.split('/') | |
|
721 | p = os.path.join(util.datapath, *fl) | |
|
722 | if os.path.isdir(p): | |
|
723 | normpaths.append(os.path.normpath(p)) | |
|
724 | return normpaths | |
|
714 | pathsrel = ['templates', '../templates'] | |
|
715 | paths = [os.path.normpath(os.path.join(util.datapath, f)) | |
|
716 | for f in pathsrel] | |
|
717 | return [p for p in paths if os.path.isdir(p)] | |
|
725 | 718 | |
|
726 | 719 | def templatepath(name): |
|
727 | 720 | '''return location of template file. returns None if not found.''' |
General Comments 0
You need to be logged in to leave comments.
Login now