Reputation: 1783
i am writing a django app which i would like to be very loosely coupled and reusable. i was wondering what the best practices are if your app is going to be used in a larger project, and the app relied on something like jquery. how do you include jquery in your app but allow it to be overridden by the very likely event that the developer of the project already has jquery for the project?
Upvotes: 1
Views: 603
Reputation: 4364
You can add it through media class.
class Media:
css = {
'all': ('/static/css/styles.css',)
}
js = ['/static/js/jquery-1.6.2.min.js','/static/js/tiny_mce.js','/static/js/jquery.autocomplete.js','/static/js/ajax_select.js',]
Upvotes: 3