mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-12-02 13:53:43 +03:00
Merge pull request #43 from Pinzauti/url-to-path
Changed url to path in documentation
This commit is contained in:
commit
3b7b607cbd
|
@ -63,7 +63,7 @@ Registration
|
||||||
|
|
||||||
.. note:: If you set account email verification as mandatory, you have to add the VerifyEmailView with the used `name`.
|
.. note:: If you set account email verification as mandatory, you have to add the VerifyEmailView with the used `name`.
|
||||||
You need to import the view: ``from dj_rest_auth.registration.views import VerifyEmailView``. Then add the url with the corresponding name:
|
You need to import the view: ``from dj_rest_auth.registration.views import VerifyEmailView``. Then add the url with the corresponding name:
|
||||||
``url(r'^dj-rest-auth/account-confirm-email/', VerifyEmailView.as_view(), name='account_email_verification_sent')`` to the urlpatterns list.
|
``path('dj-rest-auth/account-confirm-email/', VerifyEmailView.as_view(), name='account_email_verification_sent')`` to the urlpatterns list.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ Installation
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
...,
|
...,
|
||||||
url(r'^dj-rest-auth/', include('dj_rest_auth.urls'))
|
path('dj-rest-auth/', include('dj_rest_auth.urls'))
|
||||||
]
|
]
|
||||||
|
|
||||||
4. Migrate your database
|
4. Migrate your database
|
||||||
|
@ -68,8 +68,8 @@ Registration (optional)
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
...,
|
...,
|
||||||
url(r'^dj-rest-auth/', include('dj_rest_auth.urls')),
|
path('dj-rest-auth/', include('dj_rest_auth.urls')),
|
||||||
url(r'^dj-rest-auth/registration/', include('dj_rest_auth.registration.urls'))
|
path('dj-rest-auth/registration/', include('dj_rest_auth.registration.urls'))
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ Facebook
|
||||||
|
|
||||||
urlpatterns += [
|
urlpatterns += [
|
||||||
...,
|
...,
|
||||||
url(r'^dj-rest-auth/facebook/$', FacebookLogin.as_view(), name='fb_login')
|
path('dj-rest-auth/facebook/', FacebookLogin.as_view(), name='fb_login')
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ If you are using Twitter for your social authentication, it is a bit different s
|
||||||
|
|
||||||
urlpatterns += [
|
urlpatterns += [
|
||||||
...,
|
...,
|
||||||
url(r'^dj-rest-auth/twitter/$', TwitterLogin.as_view(), name='twitter_login')
|
path('dj-rest-auth/twitter/', TwitterLogin.as_view(), name='twitter_login')
|
||||||
]
|
]
|
||||||
|
|
||||||
.. note:: Starting from v0.21.0, django-allauth has dropped support for context processors. Check out http://django-allauth.readthedocs.org/en/latest/changelog.html#from-0-21-0 for more details.
|
.. note:: Starting from v0.21.0, django-allauth has dropped support for context processors. Check out http://django-allauth.readthedocs.org/en/latest/changelog.html#from-0-21-0 for more details.
|
||||||
|
@ -179,7 +179,7 @@ If you are using GitHub for your social authentication, it uses code and not Acc
|
||||||
|
|
||||||
urlpatterns += [
|
urlpatterns += [
|
||||||
...,
|
...,
|
||||||
url(r'^dj-rest-auth/github/$', GitHubLogin.as_view(), name='github_login')
|
path('dj-rest-auth/github/', GitHubLogin.as_view(), name='github_login')
|
||||||
]
|
]
|
||||||
|
|
||||||
Additional Social Connect Views
|
Additional Social Connect Views
|
||||||
|
@ -215,9 +215,9 @@ In urls.py:
|
||||||
|
|
||||||
urlpatterns += [
|
urlpatterns += [
|
||||||
...,
|
...,
|
||||||
url(r'^dj-rest-auth/facebook/connect/$', FacebookConnect.as_view(), name='fb_connect')
|
path('dj-rest-auth/facebook/connect/', FacebookConnect.as_view(), name='fb_connect')
|
||||||
url(r'^dj-rest-auth/twitter/connect/$', TwitterConnect.as_view(), name='twitter_connect')
|
path('dj-rest-auth/twitter/connect/', TwitterConnect.as_view(), name='twitter_connect')
|
||||||
url(r'^dj-rest-auth/github/connect/$', GithubConnect.as_view(), name='github_connect')
|
path('dj-rest-auth/github/connect/', GithubConnect.as_view(), name='github_connect')
|
||||||
]
|
]
|
||||||
|
|
||||||
You can also use the following views to check all social accounts attached to the current authenticated user and disconnect selected social accounts:
|
You can also use the following views to check all social accounts attached to the current authenticated user and disconnect selected social accounts:
|
||||||
|
@ -230,13 +230,13 @@ You can also use the following views to check all social accounts attached to th
|
||||||
|
|
||||||
urlpatterns += [
|
urlpatterns += [
|
||||||
...,
|
...,
|
||||||
url(
|
path(
|
||||||
r'^socialaccounts/$',
|
'socialaccounts/',
|
||||||
SocialAccountListView.as_view(),
|
SocialAccountListView.as_view(),
|
||||||
name='social_account_list'
|
name='social_account_list'
|
||||||
),
|
),
|
||||||
url(
|
path(
|
||||||
r'^socialaccounts/(?P<pk>\d+)/disconnect/$',
|
'socialaccounts/<int:pk>/disconnect/',
|
||||||
SocialAccountDisconnectView.as_view(),
|
SocialAccountDisconnectView.as_view(),
|
||||||
name='social_account_disconnect'
|
name='social_account_disconnect'
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user