You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
What you want to do is to add a class attribute to your django widget using attrs so that they will be rendered with this class, then to add the style you want to this class in your CSS section,
You can of course override the style as well, for example using the rendered id of your field, but it is less cleaner, since you will need to repeat this for every field
dk
unread,
May 21, 2015, 11:06:51 AM5/21/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
Thanks Galia, since I only have 2 fields, I think the second options will be the faster, do you have an example? no how to override the id? or the class?
in the template I am doing {{ form }} I even try to do something like <p style="font-size:150%">{{ form }}</p>
but that doesn't change it =( thanks.
Luis Zárate
unread,
May 21, 2015, 11:15:48 PM5/21/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
It is easy, you only need to put id attribute to form statement like this
<form id="my form" ...> {{form.as_p}}</form >
In CSS use cascade starting by #myform.
Other thing I was used form.as_p for printing as <p>, but you could used form.as_ul or form.as_table too. By default as_table is set when you do {{form}}