fabiocaccamo / django-maintenance-mode

:construction: :hammer_and_wrench: shows a 503 error page when maintenance-mode is on.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IGNORE_URLS setting not working

NathanUrwin opened this issue · comments

I ran pip install django-maintenance-mode

Added 'maintenance_mode', to settings.INSTALLED_APPS

And 'maintenance_mode.middleware.MaintenanceModeMiddleware', to settings.MIDDLEWARE

Along with these settings to settings.py:

MAINTENANCE_MODE = True
MAINTENANCE_MODE_IGNORE_SUPERUSER = True
MAINTENANCE_MODE_IGNORE_URLS = (r'^admin/login/$')

But there is no redirect to a 503 error page. DEBUG = True and I'm running the server locally

EDIT: If I remove the MAINTENANCE_MODE_IGNORE_URLS setting the 503 redirect DOES work, but as soon as I set IGNORE_URLS the redirect stops working.

FIX: Change (r'^admin/login/$') to (r'^/admin/login/$',)

I am not a smart man... I forgot the , at the end of MAINTENANCE_MODE_IGNORE_URLS, so it wasn't a tuple.