From 1df79c511533eb8000ae618778dd00ca632d916c Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sat, 7 Apr 2007 04:22:33 +0000 Subject: [PATCH] newforms-admin: Merged to [4945] git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@4946 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/auth/models.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py index 1a18c0a796..12774a96d5 100644 --- a/django/contrib/auth/models.py +++ b/django/contrib/auth/models.py @@ -38,6 +38,7 @@ class Permission(models.Model): name = models.CharField(_('name'), maxlength=50) content_type = models.ForeignKey(ContentType) codename = models.CharField(_('codename'), maxlength=100) + class Meta: verbose_name = _('permission') verbose_name_plural = _('permissions') @@ -56,10 +57,12 @@ class Group(models.Model): """ name = models.CharField(_('name'), maxlength=80, unique=True) permissions = models.ManyToManyField(Permission, verbose_name=_('permissions'), blank=True) + class Meta: verbose_name = _('group') verbose_name_plural = _('groups') ordering = ('name',) + class Admin: search_fields = ('name',) filter_horizontal = ('permissions',) @@ -102,10 +105,12 @@ class User(models.Model): help_text=_("In addition to the permissions manually assigned, this user will also get all permissions granted to each group he/she is in.")) user_permissions = models.ManyToManyField(Permission, verbose_name=_('user permissions'), blank=True) objects = UserManager() + class Meta: verbose_name = _('user') verbose_name_plural = _('users') ordering = ('username',) + class Admin: fields = ( (None, {'fields': ('username', 'password')}),