Hi,

So I've got a bunch of views that I need to output in three forms:
HTML with the site wrapper (header, footer etc.), HTML without the
site wrapper, and JS. The templates are really, really similar.

I'm thinking of using a url pattern like:
r'^blog/blah(?P<filetype>[-\.\/\w]+)$'
so that blog/blah/ would return the HTML with site wrapper, blog/
blah.html would return the HTML without wrapper, and blog/blah.js
would return the javascript.

Doing this means I'm putting logic in all the views that need this
functionality -- and, then, building slightly-different templates for
each of the three outputs.

There's something about this that seems wrong, but I can't imagine a
cleaner solution. Any thoughts?

Joe
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to