mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 16:40:03 +03:00
Replaced url() on path() in urls.py
This commit is contained in:
parent
92cad0d2fa
commit
17ead92970
|
@ -11,11 +11,11 @@ your API requires authentication:
|
||||||
|
|
||||||
You should make sure your authentication settings include `SessionAuthentication`.
|
You should make sure your authentication settings include `SessionAuthentication`.
|
||||||
"""
|
"""
|
||||||
from django.conf.urls import url
|
|
||||||
from django.contrib.auth import views
|
from django.contrib.auth import views
|
||||||
|
from django.urls import path
|
||||||
|
|
||||||
app_name = 'rest_framework'
|
app_name = 'rest_framework'
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^login/$', views.LoginView.as_view(template_name='rest_framework/login.html'), name='login'),
|
path('login/', views.LoginView.as_view(template_name='rest_framework/login.html'), name='login'),
|
||||||
url(r'^logout/$', views.LogoutView.as_view(), name='logout'),
|
path('logout/', views.LogoutView.as_view(), name='logout'),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user