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
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
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/
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.
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
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
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)
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
://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
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-
ens when i include the form media with a
> context variable (e.g. {{ media }} ), but the template also specifies
> a
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
12 matches
Mail list logo