-
are inserted into the DOM is often important. For example, you may have a script that depends on jQuery. Therefore, combining Media objects attempts to preserve the relative order in which assets are defined class Media: ... js = ('jQuery.js', 'calendar.js', 'noConflict.js') >>> class TimeWidget(forms.TextInput): ... class Media: ... js = ('jQuery.js', 'time.js', 'noConflict.js') >>> TimeWidget() >>> print(w1.media + w2.media)
0 码力 |
2915 页 |
2.83 MB
| 1 年前 3
-
are inserted into the DOM is often important. For example, you may have a script that depends on jQuery. Therefore, combining Media objects attempts to preserve the relative order in which assets are defined TextInput): ... class Media: ... js = ('jQuery.js', 'calendar.js', 'noConflict.js') >>> class TimeWidget(forms.TextInput): ... class Media: ... js = ('jQuery.js', 'time.js', 'noConflict.js') >>> w1 CalendarWidget() >>> w2 = TimeWidget() >>> print(w1.media + w2.media)
0 码力 |
3085 页 |
2.95 MB
| 1 年前 3
-
are inserted into the DOM is often important. For example, you may have a script that depends on jQuery. Therefore, combining Media objects attempts to preserve the relative order in which assets are defined from django import forms >>> class CalendarWidget(forms.TextInput): ... class Media: ... js = ('jQuery.js', 'calendar.js', 'noConflict.js') >>> class TimeWidget(forms.TextInput): ... class Media: (continues js = ('jQuery.js', 'time.js', 'noConflict.js') >>> w1 = CalendarWidget() >>> w2 = TimeWidget() >>> print(w1.media + w2.media)
0 码力 |
2002 页 |
6.73 MB
| 1 年前 3
-
rather elderly version of jQuery, and your plugin admin might
require something newer. In this case, in your custom change_form_template you could do something like:
{% block jquery %}