1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Reverted "Fixed #26401 -- Added BaseAuthConfig to use auth without migrations."

This reverts commit 1ec1633cb2 as it
doesn't handle ContentType's auth.Permission dependency. Thus, it
doesn't allow auth without migrations.
This commit is contained in:
Jon Dufresne
2016-10-18 17:47:29 -07:00
parent b3bd3aa07c
commit f3ea0c4bbd
5 changed files with 2 additions and 122 deletions

View File

@@ -7,26 +7,14 @@ from .checks import check_models_permissions, check_user_model
from .management import create_permissions
class BaseAuthConfig(AppConfig):
"""
AppConfig which assumes that the auth models don't exist.
"""
class AuthConfig(AppConfig):
name = 'django.contrib.auth'
verbose_name = _("Authentication and Authorization")
def ready(self):
checks.register(check_user_model, checks.Tags.models)
class AuthConfig(BaseAuthConfig):
"""
The default AppConfig for auth.
"""
def ready(self):
super(AuthConfig, self).ready()
post_migrate.connect(
create_permissions,
dispatch_uid="django.contrib.auth.management.create_permissions"
)
checks.register(check_user_model, checks.Tags.models)
checks.register(check_models_permissions, checks.Tags.models)