diff --git a/registrasion/templatetags/registrasion_tags.py b/registrasion/templatetags/registrasion_tags.py new file mode 100644 index 0000000000000000000000000000000000000000..3193a0170c16607ca0459acc7ccd83a1899026ab --- /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()