category string, fixes issue 2

This commit is contained in:
Justin Quick 2010-09-17 15:21:47 -04:00
parent 2a9f3ebd6a
commit 027569f691

View file

@ -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)