Saturday, March 31, 2012

django forms in admin

Hi , 

I ve a set of fields which is displayed in admin using fieldsets in django. But i want to modify the display of only one field. ie i used CommaSeparatedField , i want that 2 display in forms.MultipleChoiceField . How do i achieve it ? 

i did like this

class A(forms.ModelForm):
    fielda = forms.MultipleChoiceField....
    
    class Meta:
     model=A



then in admin.py


class Some(admin,ModelAdmin):

form=A


#fielsets


fieldsets = [ 

...

]


but im getting errors coz all the fields need to be displayed in forms .

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment