Ticket #16385: 0951738c5693be6a64c88e09f2dcf06499496465.diff

File 0951738c5693be6a64c88e09f2dcf06499496465.diff, 557 bytes (added by jonash, 4 years ago)

Permission ordering/JOINs

  • django/contrib/auth/models.py

    diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py
    index 8fcbdef..be3d7d1 100644
    a b class Permission(models.Model): 
    8383        verbose_name = _('permission')
    8484        verbose_name_plural = _('permissions')
    8585        unique_together = (('content_type', 'codename'),)
    86         ordering = ('content_type__app_label', 'content_type__model', 'codename')
     86        ordering = ('codename',)
    8787
    8888    def __unicode__(self):
    8989        return u"%s | %s | %s" % (
Back to Top