On 07/13/2011 02:00 PM, Andreas Pfrengle wrote:
Hello Shawn,thanks for your answer, however that's not exactly what I wanted. Now the html renders to: <label for="id_n_properties">No. of properties</label> <input value="4" type="text" name="n_properties" div_css="test" id="id_n_properties" /> However, I would want: <div class="test"> <label for="id_n_properties">No. of properties</label> <input value="4" type="text" name="n_properties" id="id_n_properties" /> </div> Additionally, I can't access {{ field.widget.attrs.div_css }} to get the class directly, I get an empty string instead.
Replace 'div_css' in my example with 'class' and you'll get 'class="test"' in your output.
-- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

