mirror of
https://github.com/django/django.git
synced 2025-10-05 00:00:37 +00:00
Remove AppCache state handling, replace with swappable caches
This commit is contained in:
parent
dbc17d035b
commit
49d1e6b0e2
6 changed files with 72 additions and 83 deletions
|
@ -21,7 +21,7 @@ get_verbose_name = lambda class_name: re.sub('(((?<=[a-z])[A-Z])|([A-Z](?![A-Z]|
|
|||
DEFAULT_NAMES = ('verbose_name', 'verbose_name_plural', 'db_table', 'ordering',
|
||||
'unique_together', 'permissions', 'get_latest_by',
|
||||
'order_with_respect_to', 'app_label', 'db_tablespace',
|
||||
'abstract', 'managed', 'proxy', 'auto_created')
|
||||
'abstract', 'managed', 'proxy', 'auto_created', 'auto_register')
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Options(object):
|
||||
|
@ -68,6 +68,9 @@ class Options(object):
|
|||
# from *other* models. Needed for some admin checks. Internal use only.
|
||||
self.related_fkey_lookups = []
|
||||
|
||||
# If we should auto-register with the AppCache
|
||||
self.auto_register = True
|
||||
|
||||
def contribute_to_class(self, cls, name):
|
||||
from django.db import connection
|
||||
from django.db.backends.util import truncate_name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue