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

Default context is missing in templates when maintenance mode is on in Django 1.9 #13

Closed
haidaraM opened this issue Oct 7, 2016 · 1 comment
Labels
bug

Comments

@haidaraM
Copy link
Contributor

@haidaraM haidaraM commented Oct 7, 2016

I can't access some variables in context in templates when maintenance mode is on. For example the variables requestand maintenance_mode are not available and I think some others variables also. I have to add them by myself by using MAINTENANCE_MODE_TEMPLATE_CONTEXT.

I think the problem is with this commit 4c2a6e5 when you added django 1.10 compatibility. I know there is a warning that says The context_instance argument of render_to_string is deprecated... but you can you use the render function as the documentation says https://docs.djangoproject.com/en/1.10/topics/http/shortcuts/#render-to-response.

I can make a pull request if you want.

@fabiocaccamo

This comment has been minimized.

Copy link
Owner

@fabiocaccamo fabiocaccamo commented Oct 10, 2016

@haidaraM just released 0.4.4 where I use render instead of render_to_response if django version >= 1.8.

@fabiocaccamo fabiocaccamo added the bug label Oct 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.