I had something like INSTALLED_APPS = ( 'my_django_app',) in my settings.py. I changed it to INSTALLED_APPS = ( 'my_django_project.my_django_app',) and it set things right.
On Jul 30, 1:11 pm, Daymien <reimund.kl...@googlemail.com> wrote: > Jippii, > I got the solution :-) > > I don't no why this problem only appear with mod_python or mod_wsgi > with apache and not with the build in webserver, but now it works! > The problem was that the app were not in the python search path. > So either you include your app to python include path or you change > the import line in your template tag. > > ********* NOT working Templatetag *********** > from django.template import Library > from note.models import Note > > register = Library() > > def display_notes(): > latest = Note.objects.all().order_by("-added_date") > return {'notes': latest} > display_notes = register.inclusion_tag("show_note.html") > (display_notes) > ************************************************* > > ********* WORKING Templatetag **************** > from django.template import Library > from gateadmin.note.models import Note > > register = Library() > > def display_notes(): > latest = Note.objects.all().order_by("-added_date") > return {'notes': latest} > display_notes = register.inclusion_tag("show_note.html") > (display_notes) > ************************************************* > > Look especially to the second include line :-) > The solution is to use the full proj. path like: > > "from project.app.models import Model" > > have fun! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---