Skip to content

Commit

Permalink
url() replaced with path()
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-DRP committed Sep 27, 2020
1 parent c13f2a1 commit 97590a9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Expand Up @@ -96,37 +96,37 @@ Quick start
4.1 [session authentication](http://www.django-rest-framework.org/api-guide/authentication/#sessionauthentication)

```python
url(r'^api/login/', include('rest_social_auth.urls_session')),
path('api/login/', include('rest_social_auth.urls_session')),
```

4.2 [token authentication](http://www.django-rest-framework.org/api-guide/authentication/#tokenauthentication)

```python
url(r'^api/login/', include('rest_social_auth.urls_token')),
path('api/login/', include('rest_social_auth.urls_token')),
```

4.3 [jwt authentication](https://github.com/davesque/django-rest-framework-simplejwt)

```python
url(r'^api/login/', include('rest_social_auth.urls_jwt_pair')),
path('api/login/', include('rest_social_auth.urls_jwt_pair')),
```

or / and

```python
url(r'^api/login/', include('rest_social_auth.urls_jwt_sliding')),
path('api/login/', include('rest_social_auth.urls_jwt_sliding')),
```

4.3.1 [jwt authentication (deprecated)](http://getblimp.github.io/django-rest-framework-jwt/)

```python
url(r'^api/login/', include('rest_social_auth.urls_jwt')),
path('api/login/', include('rest_social_auth.urls_jwt')),
```

4.4 [knox authentication](https://github.com/James1345/django-rest-knox/)

```python
url(r'^api/login/', include('rest_social_auth.urls_knox')),
path('api/login/', include('rest_social_auth.urls_knox')),
```

5. You are ready to login users
Expand Down Expand Up @@ -458,7 +458,7 @@ To do it

- define your own url:

url(r'^api/login/social/$', MySocialView.as_view(), name='social_login'),
path('api/login/social/$', MySocialView.as_view(), name='social_login'),

- define your serializer

Expand Down

0 comments on commit 97590a9

Please sign in to comment.