RealmTeam / django-rest-framework-social-oauth2

python-social-auth and oauth2 support for django-rest-framework
MIT License
1.06k stars 191 forks source link

Quick fix to enable this package to work with Django 4 and the older versions #254

Closed vigneshwrn9 closed 1 year ago

vigneshwrn9 commented 2 years ago

Hi There, would it be possible to add this line of code within the "rest_framework_social_oauth2/urls.py" file. This helps with Django4.0 and would also work with the older version.

Replace

from django.conf.urls import url, include

To

from django.conf.urls import include
try:
    from django.conf.urls import url
except ImportError:
    from django.urls import re_path as url
herobaby71 commented 2 years ago

Can we have this merge as well.