Opened 16 years ago

Closed 16 years ago

#7792 closed (invalid)

Exclude Fields on new-forms admin

Reported by: Satheesh Chandrasekhar Owned by: nobody
Component: contrib.admin Version: dev
Severity: Keywords: exclude fields
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Sometimes we need exclude fields on admin (Which have null and blank is True). See ticket(#6755), the Model Inheritance in admin having a field called user_ptr

Here the problem is solved by

Member._meta.get_field('user_ptr').blank = True

But the field still in admin.
So there is a need for exclude fields in admin.Model

Change History (1)

comment:1 by Brian Rosner, 16 years ago

milestone: 1.0 alpha
Resolution: invalid
Status: newclosed

This is a rare case and will ultimately be fixed when model inheritance is working on the admin. Excluding fields is very simple. Normally you create your own form and use the ModelForm's ability to exclude in the Meta class (this is all documented between admin.txt and newforms.txt in the newforms-admin branch docs). Secondly, perhaps you didn't read the docs well enough to understand that blank will never not show the field. It simply makes it not required. editable would be what you are looking for. This is an invalid report and I am closing.

Note: See TracTickets for help on using tickets.
Back to Top