id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 12265 Media (js/css) collection strategy in Forms has no order dependence concept tblanchard@… nobody "And thus is broken. I have a form with a bunch of fields in it and when collecting the js files to include it mixes up the order and thus core.js ends up loaded later than files that require addEvent and the js load fails. At the end of the day, this mechanism is just half baked and would be better removed entirely so busy developers can just get stuff done and not waste time with it. For example: {{{ class NewIncidentForm(forms.ModelForm): place = forms.CharField(widget=EditableMap(options={ 'layers': ['google.hybrid', 'google.streets', 'google.physical', 'google.satellite', ], 'default_lat': 39.4421, 'default_lon': -100.0, 'default_zoom': 7, 'geometry': 'point', })) when_occurred = forms.DateTimeField(widget=widgets.AdminSplitDateTime()) when_reported = forms.DateTimeField(widget=widgets.AdminSplitDateTime()) class Meta: model = Incident class Media: js = ( '/media/js/core.js', '/media/js/admin/RelatedObjectLookups.js', '/media/js/getElementsBySelector.js', '/media/js/actions.js', ) class Incident(models.Model): title = models.CharField(max_length=128) when_occurred = models.DateTimeField() when_reported = models.DateTimeField() reporter = models.ForeignKey(User) place = models.PointField() notes = models.TextField(max_length=4000) what_type = models.ForeignKey(IncidentType) # allow spatial querying objects = models.GeoManager() }}} results in this: {{{ }}} which fails because DateTimeShortcuts requires addEvent which is defined in core.js" Bug closed Forms 1.1 Normal duplicate Accepted 0 0 0 0 0 0