mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	magic-removal: Removed 'admin', 'exceptions' and 'module_constants' parameters to 'class Meta'
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2114 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -6,6 +6,9 @@ import datetime | ||||
|  | ||||
| SESSION_KEY = '_auth_user_id' | ||||
|  | ||||
| class SiteProfileNotAvailable(Exception): | ||||
|     pass | ||||
|  | ||||
| class Permission(models.Model): | ||||
|     name = models.CharField(_('name'), maxlength=50) | ||||
|     package = models.ForeignKey(Package, db_column='package') | ||||
| @@ -67,7 +70,6 @@ class User(models.Model): | ||||
|         verbose_name = _('User') | ||||
|         verbose_name_plural = _('Users') | ||||
|         ordering = ('username',) | ||||
|         exceptions = ('SiteProfileNotAvailable',) | ||||
|     class Admin: | ||||
|         fields = ( | ||||
|             (None, {'fields': ('username', 'password')}), | ||||
|   | ||||
| @@ -40,13 +40,6 @@ class Session(models.Model): | ||||
|         db_table = 'django_session' | ||||
|         verbose_name = _('session') | ||||
|         verbose_name_plural = _('sessions') | ||||
|         module_constants = { | ||||
|             'base64': base64, | ||||
|             'md5': md5, | ||||
|             'pickle': pickle, | ||||
|             'random': random, | ||||
|             'sys': sys, | ||||
|         } | ||||
|  | ||||
|     def get_decoded(self): | ||||
|         encoded_data = base64.decodestring(self.session_data) | ||||
|   | ||||
| @@ -10,8 +10,8 @@ import re | ||||
| get_verbose_name = lambda class_name: re.sub('([A-Z])', ' \\1', class_name).lower().strip() | ||||
|  | ||||
| DEFAULT_NAMES = ('verbose_name', 'verbose_name_plural', 'db_table', 'ordering', | ||||
|                   'unique_together', 'admin', 'where_constraints', 'exceptions', 'permissions', | ||||
|                   'get_latest_by', 'order_with_respect_to', 'module_constants') | ||||
|                   'unique_together', 'where_constraints', 'permissions', | ||||
|                   'get_latest_by', 'order_with_respect_to') | ||||
|  | ||||
| class Options: | ||||
|     def __init__(self, meta): | ||||
| @@ -22,12 +22,10 @@ class Options: | ||||
|         self.ordering = [] | ||||
|         self.unique_together =  [] | ||||
|         self.where_constraints =  [] | ||||
|         self.exceptions =  [] | ||||
|         self.permissions =  [] | ||||
|         self.object_name, self.app_label = None, None | ||||
|         self.get_latest_by = None | ||||
|         self.order_with_respect_to = None | ||||
|         self.module_constants = {} | ||||
|         self.admin = None | ||||
|         self.meta = meta | ||||
|         self.pk = None | ||||
|   | ||||
		Reference in New Issue
	
	Block a user