Hello,

I have a problem with ModelForms in the django admin site. I want to
exclude some fields so they won't be displayed when I edit the model
in the admin site. This is my code:


class CommonInvoiceForm(forms.ModelForm):
        price_factor = forms.ChoiceField(choices=COST_FACTOR_CHOICES)

        class Meta:
                from voipgo.accounting.invoices.models import CommonInvoice
                model = CommonInvoice
                exclude = ('template',)


So as you can see I add a new field to the form - which works as
expected. But the 'template' field I don't want to have in there is
still displayed. 'template' is a normal ForeignKey field in the model
declaration. What am I doing wrong here?
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to