Hi friends, I'm trying to custom the index.html of Django. For that, I'm writing a custom template tag (categories.py). This module should display a list, but don't display anything. Why? I'll describe that I did because if you can you explain me what is the problem, ok? 1) I created "templatetags" folder at the same level of model.py, inside my app 2) "templatetags" folder has inside __init___.py (it's empty), and categories.py 3) In categories.py I wrote: from django.template import Library from myproject.app.models import Category
register = Library() def nav_categorylist(request): categories = Category.objects.all().order_by('name')[:3] return {'categories': categories} register.inclusion_tag('admin/index.html')(nav_categorylist) 4) "index.html" is in the path: myproject/templates/admin/ index.html 5) In index.html I put this: {% load categories %} {% for cat in categories %} {{ cat.name }} {% endfor %} 6) In INSTALLED_APP I put ('myproject.app.templatetags') What is the mistake? Thank's for any help --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---