#16027: Include app_label in ContentType.__unicode__
-------------------------------------+-------------------------------------
     Reporter:  jakub                |                    Owner:
         Type:                       |  djangsters
  Cleanup/optimization               |                   Status:  assigned
    Component:                       |                  Version:  master
  contrib.contenttypes               |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:                       |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  1                    |
-------------------------------------+-------------------------------------
Changes (by djangsters):

 * status:  new => assigned
 * owner:  Fandekasp => djangsters


Comment:

 Added __repr__ function to the Contenttype model class.

 The syntax is <classname: app_label.modelname>
 {{{
 ContentType.objects.all()
 [<ContentType: contenttypes.contenttype>, <ContentType: auth.group>,
 <ContentType: admin.logentry>, <ContentType: auth.permission>,
 <ContentType: sessions.session>, <ContentType: auth.user>]
 }}}


 I did not change the __str__ representation, since this change is not
 necessarily useful in the majority of use cases, that do not have
 conflicting model names. In this case maybe a warning would be useful
 suggesting the user to set a meaningful verbose_name.

 Pull request: https://github.com/django/django/pull/1096

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16027#comment:13>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.548410f806aef00102545d6398d974d9%40djangoproject.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to