diff --git a/registrasion/templatetags/__init__.py b/registrasion/templatetags/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/registrasion/templatetags/registrasion_tags.py b/registrasion/templatetags/registrasion_tags.py new file mode 100644 index 00000000..3193a017 --- /dev/null +++ b/registrasion/templatetags/registrasion_tags.py @@ -0,0 +1,10 @@ +from registrasion import models as rego + +from django import template + +register = template.Library() + +@register.assignment_tag(takes_context=True) +def available_categories(context): + ''' Returns all of the available product categories ''' + return rego.Category.objects.all()