#2328: [patch] admin does not allow omitting fields in Admin.fields list
--------------------------------+-------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: adrian
Type: defect | Status: new
Priority: normal | Milestone:
Component: Admin interface | Version: SVN
Severity: normal | Keywords:
--------------------------------+-------------------------------------------
I ran into this trying to do something in similar vein to Luke Holt's
fields-varying-with-user
hack.
The admin app assumes that all of the model's fields are present on the
edit page, so
if you don't put a field somewhere in Model.Admin.fields then Django will
try to set it
to null every time you try to modify an instance through the admin
interface. I fixed this
by changing admin's change_stage function to create follow parameter for
the ChangeManipulator
using values from Model.Admin.fields lists.
Not fully tested yet, I'm putting the patch here hoping that someone will
let me know if this
is a bad idea.
--
Ticket URL: <http://code.djangoproject.com/ticket/2328>
Django <http://code.djangoproject.org/>
The web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" 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-updates
-~----------~----~----~----~------~----~------~--~---