Thursday, October 2, 2014

Re: Including JS/CSS in reusable widget library

Am 01.10.2014 um 14:44 schrieb Collin Anderson:
> I usually use "assets" (class Media) for including cdn hosted libraries.
>
> https://docs.djangoproject.com/en/dev/topics/forms/media/

Example: how can a reusable widget library tell that it needs jquery-ui?

Up to now the only way I see is, that the reusable widget library includes jquery-ui
in its assets (static files via Media).

But if you use two or three reusable widget libraries on one page
each widgets loads its own version of jquery-ui.

Loading one js library several times is looking for trouble.

If you just reuse the widget library in a commercial closed source environment,
you can define fixed paths to libraries like jquery, jquery-ui, ...

But this does not work for reuse in the open source world.

I am missing something for a better reuse in the django world here.

Unfortunately I don't see a solution today. But maybe some else does.

Thomas


--
Thomas Güttler
http://thomas-guettler.de/

--
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/542D3149.9090902%40tbz-pariv.de.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment