> > My default action if I can't find a better way, is to write a view > just so I can do this check, but I'd rather not if there's an > alternative I can use within the generic view.
Another alternative is to write a custom include tag to replace the built in one. Django's built in include tag is programmed to return an empty string (i.e. fail silently) on template loading exceptions. You could copy that code into a custom tag and just modify it to raise Http404 on exceptions. Warning: I haven't tried this myself in a custom tag, but I think that it will work. See the relevant code here: http://code.djangoproject.com/browser/django/trunk/django/template/loader_tags.py You would need to emulate: class IncludeNode def do_include --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---