Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #29695 -- Added system checks for admin's app dependencies and TEMPLATES setting. #9868

Merged

Conversation

math-a3k
Copy link
Contributor

  • Add the following to AdminSite checks:
  • admin.E403: A DjangoTemplates instance must be configured in TEMPLATES
  • admin.E404: context_processors.messages must be enabled in DjangoTemplates
  • admin.E405: django.contrib.auth must be in INSTALLED_APPS
  • admin.E406: django.contrib.messages must be in INSTALLED_APPS
  • admin.E407: django.contrib.sessions must be in INSTALLED_APPS
  • admin.E408: AuthenticationMiddleware must be in MIDDLEWARE
  • admin.E409: MessageMiddleware must be in MIDDLEWARE.
  • Improve the error message of admin.E402 (auth context processor needed in Django
    Templates if default auth backed is used).

  • Updated the documentation and tests accordingly.

As a side-effect, two tests needed tweaking:

  • migrations.test_commands.tests.test_migrate_with_system_checks
    Left a note for the maintainer because admin checks are triggered without the
    admin app installed

  • admin_scripts.tests.ManageCheck.test_complex_app.

This is motivated by #9682

@timgraham timgraham changed the title Admin: AdminSite Checks Improvements Fixed #29695 -- Added system checks for admin's app dependencies and TEMPLATES setting. Aug 20, 2018
@timgraham timgraham force-pushed the admin-adminsite-checks-improvements branch from 792d1b7 to a715eb0 Compare August 20, 2018 21:35
@timgraham timgraham force-pushed the admin-adminsite-checks-improvements branch from a715eb0 to 68e81a0 Compare August 20, 2018 21:39
@timgraham timgraham merged commit 371ece2 into django:master Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants