Form Media

2009-01-03 Thread tom.s.macken...@gmail.com
Hello, I am trying incorporate Form Media in my forms and I'm having some trouble interpreting how this is done via, http://docs.djangoproject.com/en/dev/topics/forms/media/ My goal is to use the admin/media/css/form.css in my template. Here is my form: class ApprovalForm(Mode

Re: Form Media

2009-01-03 Thread tom.s.macken...@gmail.com
I dont believe I missed this... It wasnt showing because the browser was interpreting it as a html tag.. haha. nm. On Jan 3, 11:52 am, "tom.s.macken...@gmail.com" wrote: > Hello, > > I am trying incorporateFormMediain my forms and I'm having some > trouble interpreting how this is done > via,ht

form media (css+js)

2013-02-19 Thread yakoub abaya
i read this page : https://docs.djangoproject.com/en/1.4/topics/forms/media but i don't understand how those files gets rendered into the page template is it our responsibility when creating template files to make sure those form media files gets rendered ? if we take django/contrib/

Controlling order of form media

2011-08-15 Thread Croepha
I was wondering if there was a way to control the order the tags will appear for {{ form.media }} when using widget media and a Media class in the form. I need something to be pulled in before the widget media, but for some reason, the widget media is being pulled in before the Media class media.

Re: form media (css+js)

2013-02-20 Thread Tom Evans
On Tue, Feb 19, 2013 at 9:07 PM, yakoub abaya wrote: > i read this page : https://docs.djangoproject.com/en/1.4/topics/forms/media > but i don't understand how those files gets rendered into the page template > is it our responsibility when creating template files to make sure thos

Re: form media (css+js)

2013-02-20 Thread yakoub abaya
e files gets rendered into the page > template > > is it our responsibility when creating template files to make sure those > > form media files gets rendered ? > > > > if we take django/contrib/admin/templates/admin/base.html for example, > > then i don't see und

staticfiles ManifestStaticFilesStorage and Form Media

2015-12-06 Thread Brian Neal
verflow to delay the evaluation of the Media classes: http://stackoverflow.com/questions/28366281/django-cachedstaticfilesstorage-in-modeladmin-media So it seems I have a couple of options: 1) Give up on form Media classes and explicitly use {% static %} in my templates instead of {% form.media %} 2)

form media and duplicating javascript links

2009-02-19 Thread christian.oud...@gmail.com
I have alot of pages using javascript, and a lot of forms that specify javascript in the Meta.media class. I keep having problems duplicating javascript includes. This happens when i include the form media with a context variable (e.g. {{ media }} ), but the template also specifies a

Re: staticfiles ManifestStaticFilesStorage and Form Media

2015-12-06 Thread Denis Cornehl
://stackoverflow.com/questions/28366281/django-cachedstaticfilesstorage-in-modeladmin-media > > So it seems I have a couple of options: > > 1) Give up on form Media classes and explicitly use {% static %} in my > templates instead of {% form.media %} > 2) Defer the resoluti

Re: staticfiles ManifestStaticFilesStorage and Form Media

2015-12-07 Thread Brian Neal
tatic as it tries to resolve these Media classes at import time. So > it seems to be a chicken and egg problem. A possible work around was found > on stackoverflow to delay the evaluation of the Media classes: > http://stackoverflow.com/questions/28366281/django-cachedstaticfilesstorage-

Re: form media and duplicating javascript links

2009-02-19 Thread Alex Gaynor
ens when i include the form media with a > context variable (e.g. {{ media }} ), but the template also specifies > a

A question about form inheritance and form media as a dynamic property

2010-05-25 Thread Vasil Vangelovski
I have a form class, call it MyBaseForm which defines some media as a dynamic property (by providing a media property, not defining a Media class). Then I have MyForm which inherits from MyBaseForm and overrides some widgets on it's fields, these widgets have their own media definitions. The proble