template: remove extension from elements while looking for a path:
this way, extension doesn't need to be provided for a CSS file for a single page.
This commit is contained in:
parent
a01bec718e
commit
6020cae869
1 changed files with 2 additions and 2 deletions
|
|
@ -299,12 +299,12 @@ class Renderer(object):
|
|||
def getThemeData(self, template_path):
|
||||
"""return template data got from template_path
|
||||
|
||||
@return tuple(unicde, unicode, bool):
|
||||
@return tuple(unicode, unicode, bool):
|
||||
path_elems: elements of the path
|
||||
theme: theme of the page
|
||||
is_default: True if the theme is the default theme
|
||||
"""
|
||||
path_elems = template_path.split(u'/')
|
||||
path_elems = [os.path.splitext(p)[0] for p in template_path.split(u'/')]
|
||||
theme = path_elems.pop(0)
|
||||
is_default = theme == C.TEMPLATE_THEME_DEFAULT
|
||||
return (path_elems, theme, is_default)
|
||||
|
|
|
|||
Loading…
Reference in a new issue