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

Remove Django deprecation warning #4112

Merged
merged 1 commit into from
May 18, 2018

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented May 18, 2018

The warning was

The standalone TEMPLATE_* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your default
TEMPLATES dict: TEMPLATE_DEBUG.

And we already have the debug option there

https://github.com/rtfd/readthedocs.org/blob/b05c82acc69e492533da9b7e3e40fef2456af6de/readthedocs/settings/base.py#L176

Also, there is a warning about Guardian

Guardian authentication backend is not hooked. You can add this in settings as eg: AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend', 'guardian.backends.ObjectPermissionBackend').

I think that setting is used in production, right?

Copy link
Contributor

@davidfischer davidfischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Firstly, I'm happy you're taking care of this. It has been on my list for a while. This is safe to remove and the setting we have in the TEMPLATES dict is sufficient. This PR is good to go!

I believe there is a small issue in our production settings, however. This change didn't introduce it. In our production settings that we have TEMPLATE_DEBUG=False but the prod settings file doesn't change settings.TEMPLATES[0]['OPTIONS']['debug'] which I believe it should. I'll open a PR for that.

@davidfischer davidfischer merged commit 39fb032 into readthedocs:master May 18, 2018
@stsewd stsewd deleted the django-deprecation-warning branch May 18, 2018 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants