Permalink
Browse files

magic-removal: Uncapitalized verbose_name and verbose_name_plural in …

…contrib apps, because the title should be in lower case

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2745 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 489d5ba commit 5d7c1fe714d947ccb3a5c75e9c29c210067847a1 @adrianholovaty adrianholovaty committed Apr 24, 2006
Showing with 22 additions and 22 deletions.
  1. +12 −12 django/contrib/auth/models.py
  2. +10 −10 django/contrib/comments/models.py
@@ -14,25 +14,25 @@ class Permission(models.Model):
content_type = models.ForeignKey(ContentType)
codename = models.CharField(_('codename'), maxlength=100)
class Meta:
- verbose_name = _('Permission')
- verbose_name_plural = _('Permissions')
+ verbose_name = _('permission')
+ verbose_name_plural = _('permissions')
unique_together = (('content_type', 'codename'),)
ordering = ('content_type', 'codename')
- def __repr__(self):
+ def __str__(self):
return "%r | %s" % (self.content_type, self.name)
class Group(models.Model):
name = models.CharField(_('name'), maxlength=80, unique=True)
permissions = models.ManyToManyField(Permission, verbose_name=_('permissions'), blank=True, filter_interface=models.HORIZONTAL)
class Meta:
- verbose_name = _('Group')
- verbose_name_plural = _('Groups')
+ verbose_name = _('group')
+ verbose_name_plural = _('groups')
ordering = ('name',)
class Admin:
search_fields = ('name',)
- def __repr__(self):
+ def __str__(self):
return self.name
class UserManager(models.Manager):
@@ -67,8 +67,8 @@ class User(models.Model):
user_permissions = models.ManyToManyField(Permission, verbose_name=_('user permissions'), blank=True, filter_interface=models.HORIZONTAL)
objects = UserManager()
class Meta:
- verbose_name = _('User')
- verbose_name_plural = _('Users')
+ verbose_name = _('user')
+ verbose_name_plural = _('users')
ordering = ('username',)
class Admin:
fields = (
@@ -82,7 +82,7 @@ class Admin:
list_filter = ('is_staff', 'is_superuser')
search_fields = ('username', 'first_name', 'last_name', 'email')
- def __repr__(self):
+ def __str__(self):
return self.username
def get_absolute_url(self):
@@ -216,9 +216,9 @@ def get_profile(self):
class Message(models.Model):
user = models.ForeignKey(User)
- message = models.TextField(_('Message'))
+ message = models.TextField(_('message'))
- def __repr__(self):
+ def __str__(self):
return self.message
class AnonymousUser(object):
@@ -228,7 +228,7 @@ class AnonymousUser(object):
def __init__(self):
pass
- def __repr__(self):
+ def __str__(self):
return 'AnonymousUser'
def save(self):
@@ -86,8 +86,8 @@ class Comment(models.Model):
site = models.ForeignKey(Site)
objects = CommentManager()
class Meta:
- verbose_name = _('Comment')
- verbose_name_plural = _('Comments')
+ verbose_name = _('comment')
+ verbose_name_plural = _('comments')
ordering = ('-submit_date',)
class Admin:
fields = (
@@ -172,8 +172,8 @@ class FreeComment(models.Model):
approved = models.BooleanField(_('approved by staff'))
site = models.ForeignKey(Site)
class Meta:
- verbose_name = _('Free comment')
- verbose_name_plural = _('Free comments')
+ verbose_name = _('free comment')
+ verbose_name_plural = _('free comments')
ordering = ('-submit_date',)
class Admin:
fields = (
@@ -233,8 +233,8 @@ class KarmaScore(models.Model):
scored_date = models.DateTimeField(_('score date'), auto_now=True)
objects = KarmaScoreManager()
class Meta:
- verbose_name = _('Karma score')
- verbose_name_plural = _('Karma scores')
+ verbose_name = _('karma score')
+ verbose_name_plural = _('karma scores')
unique_together = (('user', 'comment'),)
def __repr__(self):
@@ -264,8 +264,8 @@ class UserFlag(models.Model):
flag_date = models.DateTimeField(_('flag date'), auto_now_add=True)
objects = UserFlagManager()
class Meta:
- verbose_name = _('User flag')
- verbose_name_plural = _('User flags')
+ verbose_name = _('user flag')
+ verbose_name_plural = _('user flags')
unique_together = (('user', 'comment'),)
def __repr__(self):
@@ -276,8 +276,8 @@ class ModeratorDeletion(models.Model):
comment = models.ForeignKey(Comment)
deletion_date = models.DateTimeField(_('deletion date'), auto_now_add=True)
class Meta:
- verbose_name = _('Moderator deletion')
- verbose_name_plural = _('Moderator deletions')
+ verbose_name = _('moderator deletion')
+ verbose_name_plural = _('moderator deletions')
unique_together = (('user', 'comment'),)
def __repr__(self):

0 comments on commit 5d7c1fe

Please sign in to comment.