Opened 10 years ago

Closed 7 years ago

#6417 closed New feature (duplicate)

Small change in generic realtions

Reported by: Adrian <aribao@…> Owned by: nobody
Component: contrib.contenttypes Version: master
Severity: Normal Keywords:
Cc: aribao@… Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I've modified the class model ContentType in /django/contrib/contenttypes/ to return:

return ('%s - %s') % ( self.app_label, )

in order to make easy to use generic relations in the admin. If you had a model with the same name across different applications, it was impossible to know the exact reference in the select.

Attachments (1) (519 bytes) - added by Adrian <aribao@…> 10 years ago.

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by Adrian <aribao@…>

Attachment: added

comment:1 Changed 10 years ago by Chris Beaven

Triage Stage: UnreviewedDesign decision needed

I think this is fair enough, yes?

Adrian - try to stick to PEP8 formatting:

return '%s - %s' % (self.app_label,
#instead of:
return ('%s - %s') % ( self.app_label, )

comment:2 Changed 7 years ago by Gabriel Hurley

Component: Contrib appscontrib.contenttypes

comment:3 Changed 7 years ago by Julien Phalip

Type: New feature

comment:4 Changed 7 years ago by Julien Phalip

Severity: Normal

comment:5 Changed 7 years ago by Alex Gaynor

Easy pickings: unset
Resolution: duplicate
Status: newclosed
UI/UX: unset

Closing as a dupe of #16027 because Julien accepted that one, and it has a more recent patch/discussion.

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