Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed redundant verbose names from auth and core models, because th…

…ey're no longer required

git-svn-id: http://code.djangoproject.com/svn/django/trunk@388 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 51aba5deafd276663064f0796b25d5e512a07336 1 parent 623863d
@adrianholovaty adrianholovaty authored
Showing with 25 additions and 25 deletions.
  1. +16 −16 django/models/auth.py
  2. +9 −9 django/models/core.py
View
32 django/models/auth.py
@@ -3,9 +3,9 @@
class Permission(meta.Model):
fields = (
- meta.CharField('name', 'name', maxlength=50),
+ meta.CharField('name', maxlength=50),
meta.ForeignKey(core.Package, name='package'),
- meta.CharField('codename', 'code name', maxlength=100),
+ meta.CharField('codename', maxlength=100),
)
unique_together = (('package', 'codename'),)
ordering = ('package', 'codename')
@@ -15,7 +15,7 @@ def __repr__(self):
class Group(meta.Model):
fields = (
- meta.CharField('name', 'name', maxlength=80, unique=True),
+ meta.CharField('name', maxlength=80, unique=True),
meta.ManyToManyField(Permission, blank=True, filter_interface=meta.HORIZONTAL),
)
ordering = ('name',)
@@ -28,18 +28,18 @@ def __repr__(self):
class User(meta.Model):
fields = (
- meta.CharField('username', 'username', maxlength=30, unique=True,
+ meta.CharField('username', maxlength=30, unique=True,
validator_list=[validators.isAlphaNumeric]),
- meta.CharField('first_name', 'first name', maxlength=30, blank=True),
- meta.CharField('last_name', 'last name', maxlength=30, blank=True),
+ meta.CharField('first_name', maxlength=30, blank=True),
+ meta.CharField('last_name', maxlength=30, blank=True),
meta.EmailField('email', 'e-mail address', blank=True),
meta.CharField('password_md5', 'password', maxlength=32, help_text="Use an MD5 hash -- not the raw password."),
meta.BooleanField('is_staff', 'staff status',
help_text="Designates whether the user can log into this admin site."),
meta.BooleanField('is_active', 'active', default=True),
meta.BooleanField('is_superuser', 'superuser status'),
- meta.DateTimeField('last_login', 'last login', default=meta.LazyDate()),
- meta.DateTimeField('date_joined', 'date joined', default=meta.LazyDate()),
+ meta.DateTimeField('last_login', default=meta.LazyDate()),
+ meta.DateTimeField('date_joined', default=meta.LazyDate()),
meta.ManyToManyField(Group, blank=True,
help_text="In addition to the permissions manually assigned, this user will also get all permissions granted to each group he/she is in."),
meta.ManyToManyField(Permission, name='user_permissions', blank=True, filter_interface=meta.HORIZONTAL),
@@ -175,8 +175,8 @@ def _module_make_random_password(length=10, allowed_chars='abcdefghjkmnpqrstuvwx
class Session(meta.Model):
fields = (
meta.ForeignKey(User),
- meta.CharField('session_md5', 'session MD5 hash', maxlength=32),
- meta.DateTimeField('start_time', 'start time', auto_now=True),
+ meta.CharField('session_md5', maxlength=32),
+ meta.DateTimeField('start_time', auto_now=True),
)
module_constants = {
'TEST_COOKIE_NAME': 'testcookie',
@@ -233,7 +233,7 @@ def _module_start_web_session(user_id, request, response):
class Message(meta.Model):
fields = (
meta.ForeignKey(User),
- meta.TextField('message', 'message'),
+ meta.TextField('message'),
)
def __repr__(self):
@@ -244,13 +244,13 @@ class LogEntry(meta.Model):
verbose_name_plural = 'log entries'
db_table = 'auth_admin_log'
fields = (
- meta.DateTimeField('action_time', 'action time', auto_now=True),
+ meta.DateTimeField('action_time', auto_now=True),
meta.ForeignKey(User),
meta.ForeignKey(core.ContentType, name='content_type_id', rel_name='content_type', blank=True, null=True),
- meta.IntegerField('object_id', 'object ID', blank=True, null=True),
- meta.CharField('object_repr', 'object representation', maxlength=200),
- meta.PositiveSmallIntegerField('action_flag', 'action flag'),
- meta.TextField('change_message', 'change message', blank=True),
+ meta.IntegerField('object_id', blank=True, null=True),
+ meta.CharField('object_repr', maxlength=200),
+ meta.PositiveSmallIntegerField('action_flag'),
+ meta.TextField('change_message', blank=True),
)
ordering = ('-action_time',)
module_constants = {
View
18 django/models/core.py
@@ -19,8 +19,8 @@ def _module_get_current():
class Package(meta.Model):
db_table = 'packages'
fields = (
- meta.CharField('label', 'label', maxlength=20, primary_key=True),
- meta.CharField('name', 'name', maxlength=30, unique=True),
+ meta.CharField('label', maxlength=20, primary_key=True),
+ meta.CharField('name', maxlength=30, unique=True),
)
ordering = ('name',)
@@ -30,9 +30,9 @@ def __repr__(self):
class ContentType(meta.Model):
db_table = 'content_types'
fields = (
- meta.CharField('name', 'name', maxlength=100),
+ meta.CharField('name', maxlength=100),
meta.ForeignKey(Package, name='package'),
- meta.CharField('python_module_name', 'Python module name', maxlength=50),
+ meta.CharField('python_module_name', maxlength=50),
)
ordering = ('package', 'name')
unique_together = (('package', 'python_module_name'),)
@@ -78,12 +78,12 @@ class FlatFile(meta.Model):
fields = (
meta.CharField('url', 'URL', maxlength=100, validator_list=[validators.isAlphaNumericURL],
help_text="Example: '/about/contact/'. Make sure to have leading and trailing slashes."),
- meta.CharField('title', 'title', maxlength=200),
- meta.TextField('content', 'content', help_text="Full HTML is allowed."),
- meta.BooleanField('enable_comments', 'enable comments'),
- meta.CharField('template_name', 'template name', maxlength=70, blank=True,
+ meta.CharField('title', maxlength=200),
+ meta.TextField('content', help_text="Full HTML is allowed."),
+ meta.BooleanField('enable_comments'),
+ meta.CharField('template_name', maxlength=70, blank=True,
help_text="Example: 'flatfiles/contact_page'. If this isn't provided, the system will use 'flatfiles/default'."),
- meta.BooleanField('registration_required', 'registration required',
+ meta.BooleanField('registration_required',
help_text="If this is checked, only logged-in users will be able to view the page."),
meta.ManyToManyField(Site),
)
Please sign in to comment.
Something went wrong with that request. Please try again.