Opened 9 years ago

Closed 5 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@…> 9 years ago.

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by Adrian <aribao@…>

comment:1 Changed 9 years ago by SmileyChris

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design 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 5 years ago by gabrielhurley

  • Component changed from Contrib apps to contrib.contenttypes

comment:3 Changed 5 years ago by julien

  • Type set to New feature

comment:4 Changed 5 years ago by julien

  • Severity set to Normal

comment:5 Changed 5 years ago by Alex

  • Easy pickings unset
  • Resolution set to duplicate
  • Status changed from new to closed
  • 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