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

Pass maintenance mode to all views

haidaraM opened this issue · comments

I'm wondering if you plan to implement a way to know that if maintenance mode is on or off in all views. This can be implemented by using context processor https://docs.djangoproject.com/en/1.10/ref/templates/api/.

It can be useful if we want to add some buttons to enable/disable the maintenance mode on web pages.

Frankly that's not planned, feel free to send me a PR.

Anyway actually you can do it by using the core API https://github.com/fabiocaccamo/django-maintenance-mode#python

Yes you are right but you have to modify all your views if I understodd well. With a context processor it's just one function and maybe some others modifications.

I will send a PR and you can check...

Fixed with 0.4.1 version