Changeset - c192fef491c4
[Not reviewed]
0 0 2
Christopher Neugebauer - 8 years ago 2016-03-25 03:16:30
chrisjrn@gmail.com
Adds basic template tag for available categories. Currently does not check enabling conditions.
2 files changed with 10 insertions and 0 deletions:
0 comments (0 inline, 0 general)
registrasion/templatetags/__init__.py
Show inline comments
 
new file 100644
registrasion/templatetags/registrasion_tags.py
Show inline comments
 
new file 100644
 
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()
0 comments (0 inline, 0 general)