Re: [Django] #12265: Media (js/css) collection strategy in Forms has no order dependence concept

2017-08-26 Thread Django
#12265: Media (js/css) collection strategy in Forms has no order dependence 
concept
--+-
 Reporter:  tblanchard@…  |Owner:  nobody
 Type:  Bug   |   Status:  closed
Component:  Forms |  Version:  1.1
 Severity:  Normal|   Resolution:  duplicate
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+-
Changes (by Collin Anderson):

 * status:  new => closed
 * resolution:   => duplicate


Comment:

 I believe this is fixed by #28377

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/076.7df6a01b612c18aeccbf37fe7b1fed9a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #12265: Media (js/css) collection strategy in Forms has no order dependence concept

2015-10-09 Thread Django
#12265: Media (js/css) collection strategy in Forms has no order dependence 
concept
--+
 Reporter:  tblanchard@…  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Forms |  Version:  1.1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by timgraham):

 See #21318 for a ticket requesting documentation about this.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/076.c19ce6b594b93a8b2a936f55a934e4d5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #12265: Media (js/css) collection strategy in Forms has no order dependence concept

2011-03-14 Thread Django
#12265: Media (js/css) collection strategy in Forms has no order dependence 
concept
+--
   Reporter:  tblanchard@…  |Owner:  nobody
 Status:  new   |Milestone:
  Component:  Forms |  Version:  1.1
 Resolution:| Keywords:
   Triage Stage:  Accepted  |Has patch:  0
Needs documentation:  0 |  Needs tests:  0
Patch needs improvement:  0 |
+--

Comment (by alexr):

 I think this is a combination of issues.

 1) The user wants to use a django admin widget outside of the admin. Since
 the widgets don't include all of the media that they need, he is needing
 to add some extra js and css to the media definition.
 http://stackoverflow.com/questions/38601/using-django-time-date-widgets-
 in-custom-form/719583#719583

 2) Adding the js and css to the form media class isn't working because the
 media from the fields is added before the media from the form.

 The solution is to add the js and css to the template before the form, but
 that is really a hack to work around the fact that he can't define media
 in his class to do what he needs. He could also subclass the admin widgets
 and add the required media to the fields.

 Solutions:

 1) Make the admin widgets contain all the media they need within their own
 media definition.

 2) Change the admonition on this page to give a better explanation of some
 of the pitfalls of using admin widgets.
 http://docs.djangoproject.com/en/dev/topics/forms/media/#s-form-media

 3) Document the order that media is combined. (Fields, in field order,
 then form media added.)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12265: Media (js/css) collection strategy in Forms has no order dependence concept

2010-02-05 Thread Django
#12265: Media (js/css) collection strategy in Forms has no order dependence 
concept
-+--
  Reporter:  tblanch...@mac.com  | Owner:  nobody
Status:  new | Milestone:
 Component:  Forms   |   Version:  1.1   
Resolution:  |  Keywords:
 Stage:  Accepted| Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by russellm):

  * stage:  Unreviewed => Accepted

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12265: Media (js/css) collection strategy in Forms has no order dependence concept

2009-11-25 Thread Django
#12265: Media (js/css) collection strategy in Forms has no order dependence 
concept
-+--
  Reporter:  tblanch...@mac.com  | Owner:  nobody
Status:  new | Milestone:
 Component:  Forms   |   Version:  1.1   
Resolution:  |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by Alex):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Old description:

> 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:
>
> media="all" rel="stylesheet" />
> 
>  src="/media/js/admin/DateTimeShortcuts.js">
>  src="http://openlayers.org/api/2.8/OpenLayers.js";>
>  src="/static/olwidget/js/olwidget.js">
>  src="http://maps.google.com/maps?file=api&v=2&key=ABQIWGazslnMSgtzbIMfXLHIgBS5ci6sQZUkD9hfwKAiXgiJK2N7uxTWbLDcob2apHjRnK6OlA7hReqQaA";>
> 
>  src="/media/js/admin/RelatedObjectLookups.js">
>  src="/media/js/getElementsBySelector.js">
> 
>
> which fails because DateTimeShortcuts requires addEvent which is defined
> in core.js

New description:

 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:
 {{{

 
 
 http://openlayers.org/api/2.8/OpenLayers.js";>
 
 

[Django] #12265: Media (js/css) collection strategy in Forms has no order dependence concept

2009-11-25 Thread Django
#12265: Media (js/css) collection strategy in Forms has no order dependence 
concept
+---
 Reporter:  tblanch...@mac.com  |   Owner:  nobody
   Status:  new |   Milestone:
Component:  Forms   | Version:  1.1   
 Keywords:  |   Stage:  Unreviewed
Has_patch:  0   |  
+---
 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:


 
 
 http://openlayers.org/api/2.8/OpenLayers.js";>
 
 http://maps.google.com/maps?file=api&v=2&key=ABQIWGazslnMSgtzbIMfXLHIgBS5ci6sQZUkD9hfwKAiXgiJK2N7uxTWbLDcob2apHjRnK6OlA7hReqQaA";>
 
 
 
 

 which fails because DateTimeShortcuts requires addEvent which is defined
 in core.js

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

--

You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.