Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Adrian Holovaty authored August 02, 2005
32  django/models/auth.py
@@ -3,9 +3,9 @@
3 3
 
4 4
 class Permission(meta.Model):
5 5
     fields = (
6  
-        meta.CharField('name', 'name', maxlength=50),
  6
+        meta.CharField('name', maxlength=50),
7 7
         meta.ForeignKey(core.Package, name='package'),
8  
-        meta.CharField('codename', 'code name', maxlength=100),
  8
+        meta.CharField('codename', maxlength=100),
9 9
     )
10 10
     unique_together = (('package', 'codename'),)
11 11
     ordering = ('package', 'codename')
@@ -15,7 +15,7 @@ def __repr__(self):
15 15
 
16 16
 class Group(meta.Model):
17 17
     fields = (
18  
-        meta.CharField('name', 'name', maxlength=80, unique=True),
  18
+        meta.CharField('name', maxlength=80, unique=True),
19 19
         meta.ManyToManyField(Permission, blank=True, filter_interface=meta.HORIZONTAL),
20 20
     )
21 21
     ordering = ('name',)
@@ -28,18 +28,18 @@ def __repr__(self):
28 28
 
29 29
 class User(meta.Model):
30 30
     fields = (
31  
-        meta.CharField('username', 'username', maxlength=30, unique=True,
  31
+        meta.CharField('username', maxlength=30, unique=True,
32 32
             validator_list=[validators.isAlphaNumeric]),
33  
-        meta.CharField('first_name', 'first name', maxlength=30, blank=True),
34  
-        meta.CharField('last_name', 'last name', maxlength=30, blank=True),
  33
+        meta.CharField('first_name', maxlength=30, blank=True),
  34
+        meta.CharField('last_name', maxlength=30, blank=True),
35 35
         meta.EmailField('email', 'e-mail address', blank=True),
36 36
         meta.CharField('password_md5', 'password', maxlength=32, help_text="Use an MD5 hash -- not the raw password."),
37 37
         meta.BooleanField('is_staff', 'staff status',
38 38
             help_text="Designates whether the user can log into this admin site."),
39 39
         meta.BooleanField('is_active', 'active', default=True),
40 40
         meta.BooleanField('is_superuser', 'superuser status'),
41  
-        meta.DateTimeField('last_login', 'last login', default=meta.LazyDate()),
42  
-        meta.DateTimeField('date_joined', 'date joined', default=meta.LazyDate()),
  41
+        meta.DateTimeField('last_login', default=meta.LazyDate()),
  42
+        meta.DateTimeField('date_joined', default=meta.LazyDate()),
43 43
         meta.ManyToManyField(Group, blank=True,
44 44
             help_text="In addition to the permissions manually assigned, this user will also get all permissions granted to each group he/she is in."),
45 45
         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
175 175
 class Session(meta.Model):
176 176
     fields = (
177 177
         meta.ForeignKey(User),
178  
-        meta.CharField('session_md5', 'session MD5 hash', maxlength=32),
179  
-        meta.DateTimeField('start_time', 'start time', auto_now=True),
  178
+        meta.CharField('session_md5', maxlength=32),
  179
+        meta.DateTimeField('start_time', auto_now=True),
180 180
     )
181 181
     module_constants = {
182 182
         'TEST_COOKIE_NAME': 'testcookie',
@@ -233,7 +233,7 @@ def _module_start_web_session(user_id, request, response):
233 233
 class Message(meta.Model):
234 234
     fields = (
235 235
         meta.ForeignKey(User),
236  
-        meta.TextField('message', 'message'),
  236
+        meta.TextField('message'),
237 237
     )
238 238
 
239 239
     def __repr__(self):
@@ -244,13 +244,13 @@ class LogEntry(meta.Model):
244 244
     verbose_name_plural = 'log entries'
245 245
     db_table = 'auth_admin_log'
246 246
     fields = (
247  
-        meta.DateTimeField('action_time', 'action time', auto_now=True),
  247
+        meta.DateTimeField('action_time', auto_now=True),
248 248
         meta.ForeignKey(User),
249 249
         meta.ForeignKey(core.ContentType, name='content_type_id', rel_name='content_type', blank=True, null=True),
250  
-        meta.IntegerField('object_id', 'object ID', blank=True, null=True),
251  
-        meta.CharField('object_repr', 'object representation', maxlength=200),
252  
-        meta.PositiveSmallIntegerField('action_flag', 'action flag'),
253  
-        meta.TextField('change_message', 'change message', blank=True),
  250
+        meta.IntegerField('object_id', blank=True, null=True),
  251
+        meta.CharField('object_repr', maxlength=200),
  252
+        meta.PositiveSmallIntegerField('action_flag'),
  253
+        meta.TextField('change_message', blank=True),
254 254
     )
255 255
     ordering = ('-action_time',)
256 256
     module_constants = {
18  django/models/core.py
@@ -19,8 +19,8 @@ def _module_get_current():
19 19
 class Package(meta.Model):
20 20
     db_table = 'packages'
21 21
     fields = (
22  
-        meta.CharField('label', 'label', maxlength=20, primary_key=True),
23  
-        meta.CharField('name', 'name', maxlength=30, unique=True),
  22
+        meta.CharField('label', maxlength=20, primary_key=True),
  23
+        meta.CharField('name', maxlength=30, unique=True),
24 24
     )
25 25
     ordering = ('name',)
26 26
 
@@ -30,9 +30,9 @@ def __repr__(self):
30 30
 class ContentType(meta.Model):
31 31
     db_table = 'content_types'
32 32
     fields = (
33  
-        meta.CharField('name', 'name', maxlength=100),
  33
+        meta.CharField('name', maxlength=100),
34 34
         meta.ForeignKey(Package, name='package'),
35  
-        meta.CharField('python_module_name', 'Python module name', maxlength=50),
  35
+        meta.CharField('python_module_name', maxlength=50),
36 36
     )
37 37
     ordering = ('package', 'name')
38 38
     unique_together = (('package', 'python_module_name'),)
@@ -78,12 +78,12 @@ class FlatFile(meta.Model):
78 78
     fields = (
79 79
         meta.CharField('url', 'URL', maxlength=100, validator_list=[validators.isAlphaNumericURL],
80 80
             help_text="Example: '/about/contact/'. Make sure to have leading and trailing slashes."),
81  
-        meta.CharField('title', 'title', maxlength=200),
82  
-        meta.TextField('content', 'content', help_text="Full HTML is allowed."),
83  
-        meta.BooleanField('enable_comments', 'enable comments'),
84  
-        meta.CharField('template_name', 'template name', maxlength=70, blank=True,
  81
+        meta.CharField('title', maxlength=200),
  82
+        meta.TextField('content', help_text="Full HTML is allowed."),
  83
+        meta.BooleanField('enable_comments'),
  84
+        meta.CharField('template_name', maxlength=70, blank=True,
85 85
             help_text="Example: 'flatfiles/contact_page'. If this isn't provided, the system will use 'flatfiles/default'."),
86  
-        meta.BooleanField('registration_required', 'registration required',
  86
+        meta.BooleanField('registration_required',
87 87
             help_text="If this is checked, only logged-in users will be able to view the page."),
88 88
         meta.ManyToManyField(Site),
89 89
     )

0 notes on commit 51aba5d

Please sign in to comment.
Something went wrong with that request. Please try again.