dizballanze/django-admin-env-notice

Does this work with Django 4.0?

lanshark opened this issue · 3 comments

  • django-admin-env-notice version: 0.4.0
  • Django version: 4.0.1
  • Python version: 3.10.2
  • Operating System: Linux Mint

Description

Installed per instructions, set ENVIRONMENT_NAME, ENVIRONMENT_COLOR.

Expected to see a RED banner with Production on the /admin after login.

Got nothing.

What I Did

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.

I just run into the same problem on Django 4.0. The docs mention

Add it to your INSTALLED_APPS before django.contrib.admin:

And indeed it works after moving it above.

I have added it before the django.contrib.admin, and also the context processor is first in the templates, but still not working.

I got it working - not sure what was different, but I moved the context processor line around, and now it's working.