summaryrefslogtreecommitdiff
path: root/lib/python2.7/site-packages/django/contrib/admin/__init__.py
diff options
context:
space:
mode:
authorcoderick142017-05-17 15:40:18 +0530
committercoderick142017-05-17 15:41:00 +0530
commita1e0a5502f04da68b6a9ca8508dda3f9d7e1d055 (patch)
tree20181e6b1936f50ad48d8e35720d64a37566f558 /lib/python2.7/site-packages/django/contrib/admin/__init__.py
parent6f4a84c1e58ff4d54aab94cbee26e995328b05b8 (diff)
downloadSBHS-2018-Rpi-a1e0a5502f04da68b6a9ca8508dda3f9d7e1d055.tar.gz
SBHS-2018-Rpi-a1e0a5502f04da68b6a9ca8508dda3f9d7e1d055.tar.bz2
SBHS-2018-Rpi-a1e0a5502f04da68b6a9ca8508dda3f9d7e1d055.zip
Upgrade to Django 1.11
- Database integration yet to be tested
Diffstat (limited to 'lib/python2.7/site-packages/django/contrib/admin/__init__.py')
-rw-r--r--lib/python2.7/site-packages/django/contrib/admin/__init__.py41
1 files changed, 0 insertions, 41 deletions
diff --git a/lib/python2.7/site-packages/django/contrib/admin/__init__.py b/lib/python2.7/site-packages/django/contrib/admin/__init__.py
deleted file mode 100644
index 1084784..0000000
--- a/lib/python2.7/site-packages/django/contrib/admin/__init__.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# ACTION_CHECKBOX_NAME is unused, but should stay since its import from here
-# has been referenced in documentation.
-from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME
-from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL
-from django.contrib.admin.options import StackedInline, TabularInline
-from django.contrib.admin.sites import AdminSite, site
-from django.contrib.admin.filters import (ListFilter, SimpleListFilter,
- FieldListFilter, BooleanFieldListFilter, RelatedFieldListFilter,
- ChoicesFieldListFilter, DateFieldListFilter, AllValuesFieldListFilter)
-
-
-def autodiscover():
- """
- Auto-discover INSTALLED_APPS admin.py modules and fail silently when
- not present. This forces an import on them to register any admin bits they
- may want.
- """
-
- import copy
- from django.conf import settings
- from django.utils.importlib import import_module
- from django.utils.module_loading import module_has_submodule
-
- for app in settings.INSTALLED_APPS:
- mod = import_module(app)
- # Attempt to import the app's admin module.
- try:
- before_import_registry = copy.copy(site._registry)
- import_module('%s.admin' % app)
- except:
- # Reset the model registry to the state before the last import as
- # this import will have to reoccur on the next request and this
- # could raise NotRegistered and AlreadyRegistered exceptions
- # (see #8245).
- site._registry = before_import_registry
-
- # Decide whether to bubble up this error. If the app just
- # doesn't have an admin module, we can ignore the error
- # attempting to import it, otherwise we want it to bubble up.
- if module_has_submodule(mod, 'admin'):
- raise