Opened 14 years ago

Closed 13 years ago

#2844 closed defect (wontfix)

[patch] make various field types pass member_name

Reported by: Maximillian Dornseif <md@…> Owned by: nobody
Component: Core (Other) Version: master
Severity: minor Keywords:
Cc: md@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I was having two Model like this:

class FedasCategory(models.Model):
    id                = models.PositiveIntegerField(primary_key=True)

class Product(models.Model):
    fedas        = models.ForeignKey('FedasCategory', raw_id_admin=True, null=True, blank=True,
                   help_text='FEDAS Warenklassifikation.')   

This thre an exception in admin unless I removed "raw_id_admin=True" or changed PositiveIntegerField to IntegerField. Some investigation showed that forms/ some field types thake an parameter member_name and some don't. I'm nut sure about the rationale behind this but I suspect it is an error. Changing the *Integer fields and make them pass member_name to their superclass solved my problems. Get a patch at

I'm not really sure about the member_name thing and I'm not really sure I'm fixing the right thing but I suspecct other fields like FloatField, LargeTextField and EmailField should also accept the member_name parameter in their constructor.

Change History (2)

comment:1 Changed 13 years ago by jaywgraves@…

This bit me also. I know 'oldforms' is going away soon, so I just changed my model to use an IntegerField as explained above.

comment:2 Changed 13 years ago by Chris Beaven

Resolution: wontfix
Status: newclosed

Closing because this is oldforms. If someone really wants it, provide a patch and reopen

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