Monday, September 30, 2013

Re: Dealing with redundant JS inclusions at template levels

I Dont know your design, usually i include the js library on base template and my apps templates extend from that... or just put another base template for every app...

If you have some example code or tell us why you do that then we be more helpfull

See ya



2013/9/30 Darren Spruell <phatbuckett@gmail.com>
Spent a bit of time debugging some faulty JavaScript library
functionality before I realized that I had included the library at
multiple levels in the project - first site-wide in the base template,
and then within a app. I think I ran into this:

http://stackoverflow.com/questions/4891278/what-is-the-danger-in-including-the-same-javascript-library-twice

Is there a good design pattern to this situation, bearing in mind a
need to include JS libraries at project level and a desire to use apps
that include the same libraries in an attempt to be reusable?

Looking at jQuery and Bootstrap for this.

--
Darren Spruell
phatbuckett@gmail.com

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKVSOJVxQ8XF9wojenv6FW53CTHw28xMsD7LCoYas5%2BRchxtBA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Rafael E. Ferrero

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJJc_8XTE884Y9oCCK1StrtRGxt0Jvd%3DcJiOfboNOdarK%3DC05A%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment