Commits

Anonymous committed a175040

Fixed #7115: tweaked ordering on Permission to more closely match the pre-QSRF behavior, which was nice. Thanks, Matthew Flanagan.

Comments (0)

Files changed (1)

django/contrib/auth/models.py

         verbose_name = _('permission')
         verbose_name_plural = _('permissions')
         unique_together = (('content_type', 'codename'),)
-        ordering = ('content_type', 'codename')
+        ordering = ('content_type__app_label', 'codename')
 
     def __unicode__(self):
         return u"%s | %s | %s" % (self.content_type.app_label, self.content_type, self.name)