thanks to everyone for all of your assistance.  in the end, i created a
custom template loader that pulls templates from a database table,
based on the dbtemplate loader that georg created for his cms system.
i already had a data model so creating the loader and adding the
correct incantations to settings.py was pretty simple.

the problem arrose when there was not a template in the database that
corresponded to a template called from a view or from urls.py.  my
understanding of how TEMPLATE_LOADERS worked was that django would
check the first one, the next one listed and the next, etc, until it
found a template.  if in the end no template was found, then raise an
exception.  this, however, does not seem to be the case for the admin
site.  i have:

TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.load_template_source',
    'django.template.loaders.app_directories.load_template_source',
    'myproject.myapp.loader.load_template_source',
)

django throws an exception, for example when you try to access the
flatpages section of the admin: /admin/flatpages/flatpage/ ):

DoesNotExist at /admin/flatpages/flatpage/
Templates matching query does not exist.
Request Method:         GET
Request URL:    http://localhost/admin/flatpages/flatpage/
Exception Type:         DoesNotExist
Exception Value:        Templates matching query does not exist.
Exception Location:
        /home/plungerman/django_src/django/db/models/query.py in get, line 204

oddly enough, the admin home page works it seems, as does the
documentation section.  can anyone shed some light on this behaviour?
i have added the django admin templates directory to the TEMPLATE_DIRS
variable in setttings.py and this does not help either.  seems like i
am missing something here.

later skaters


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to