Actually I wanted to know how to

Say I have a model "Model_1" and I made a form from that model using
ModelForm
now how am I supposed to add custom CSS to the fields of this model?

class Model_1Form(ModelForm):
    class Meta:
        model = Model_1
        exclude = ('hash')
    def save(self, request):
      something something

Let me know if I missed something.
Thanks

On Jun 3, 9:14 am, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
> Hey there,
>
> You probably want 
> this:http://www.djangoproject.com/documentation/newforms/#customizing-widg...
>
> You'll have to specify the field types for your model, then widget
> types for each field, and the extra attributes go in the widget.
>
> Yrs,
> E
>
> On Jun 3, 2008, at 2:23 AM, Mayank Dhingra wrote:
>
>
>
> > Hi,
>
> > I was looking to add custom css to the fields of a (new)form that I
> > created using ModelForm
> > but couldn't find any mention or discussion on it.
>
> > Does any know know how can I achieve it ?
>
> > Thanks in advance,
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to