I have alot of pages using javascript, and a lot of forms that specify
javascript in the Meta.media class. I keep having problems duplicating
javascript includes. This happens when i include the form media with a
context variable (e.g. {{ media }}  ), but the template also specifies
a <script src="..."> tag.

One approach I considered was to never specify <script src=... > tags
in my templates, and only specify media in my views, and pass them to
the "media" context variable. This would work, but seems like an
improper separation of concerns, because the view shouldn't care about
what media the template gets, the template should.

Is there a clean way to fix this problem?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to