mirror of
https://github.com/jazzband/django-categories.git
synced 2026-03-16 22:30:24 +00:00
category string, fixes issue 2
This commit is contained in:
parent
2a9f3ebd6a
commit
027569f691
1 changed files with 2 additions and 2 deletions
|
|
@ -12,7 +12,7 @@ def get_category(category_string):
|
|||
"""
|
||||
Convert a string, including a path, and return the Category object
|
||||
"""
|
||||
if category.startswith('"') and category.endswith('"'):
|
||||
if category_string.startswith('"') and category_string.endswith('"'):
|
||||
category = category_string[1:-1]
|
||||
else:
|
||||
category = category_string
|
||||
|
|
@ -131,4 +131,4 @@ def get_top_level_categories(parser, token):
|
|||
raise template.TemplateSyntaxError, "First argyment must be 'as'."
|
||||
return TopLevelCategoriesNode(bits[2])
|
||||
|
||||
register.tag(get_top_level_categories)
|
||||
register.tag(get_top_level_categories)
|
||||
|
|
|
|||
Loading…
Reference in a new issue