Show More
@@ -553,7 +553,6 b' funcs = {' | |||||
553 |
|
553 | |||
554 | # template engine |
|
554 | # template engine | |
555 |
|
555 | |||
556 | path = ['templates', '../templates'] |
|
|||
557 | stringify = templatefilters.stringify |
|
556 | stringify = templatefilters.stringify | |
558 |
|
557 | |||
559 | def _flatten(thing): |
|
558 | def _flatten(thing): | |
@@ -712,16 +711,10 b' class templater(object):' | |||||
712 |
|
711 | |||
713 | def templatepaths(): |
|
712 | def templatepaths(): | |
714 | '''return locations used for template files.''' |
|
713 | '''return locations used for template files.''' | |
715 | normpaths = [] |
|
714 | pathsrel = ['templates', '../templates'] | |
716 | for f in path: |
|
715 | paths = [os.path.normpath(os.path.join(util.datapath, f)) | |
717 | if f.startswith('/'): |
|
716 | for f in pathsrel] | |
718 | p = f |
|
717 | return [p for p in paths if os.path.isdir(p)] | |
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 |
|
|||
725 |
|
718 | |||
726 | def templatepath(name): |
|
719 | def templatepath(name): | |
727 | '''return location of template file. returns None if not found.''' |
|
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