-
Notifications
You must be signed in to change notification settings - Fork 19
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
chore: Resolve RemovedInDjango40Warning warnings. #144
Conversation
877f7c1
to
892316d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you find yourself needing to do more things like this, there's a codemod utility at https://github.com/adamchainz/django-upgrade that can do most of it for you (Arbi-BOM is currently running it across edx-platform).
auth_backends/urls.py
Outdated
@@ -2,15 +2,16 @@ | |||
|
|||
Add these to your project's `urlpatterns` to avoid duplicating code. | |||
""" | |||
from django.conf.urls import url, include | |||
from django.conf.urls import include | |||
from django.urls import re_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include
is also now available via django.urls
, so this whole thing can be simplified to from django.urls import include, re_path
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good, will change
url('', include('social_django.urls', namespace='social')), | ||
re_path(r'^login/$', EdxOAuth2LoginView.as_view(), name='login'), | ||
re_path(r'^logout/$', EdxOAuth2LogoutView.as_view(), name='logout'), | ||
re_path('', include('social_django.urls', namespace='social')), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll probably want to change these to use path()
later, but I'm fine with punting that until we have more experience and docs for doing it.
892316d
to
68f175b
Compare
68f175b
to
b356c31
Compare
Description:
Use
django.urls
instead ofdjango.conf.urls
to resolve REmovedInDjango40WarningsJIRA:
No associated ticket.
Additional Details
Reviewers:
Merge checklist:
Post merge:
finished.