stash
This commit is contained in:
parent
916de9fd6b
commit
6aaa522a6b
1 changed files with 5 additions and 1 deletions
|
@ -3,6 +3,7 @@ from rest_framework.decorators import api_view, permission_classes, authenticati
|
||||||
from rest_framework.response import Response
|
from rest_framework.response import Response
|
||||||
from rest_framework.authentication import BasicAuthentication
|
from rest_framework.authentication import BasicAuthentication
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
|
from django.urls import path
|
||||||
|
|
||||||
|
|
||||||
class UserSerializer(serializers.ModelSerializer):
|
class UserSerializer(serializers.ModelSerializer):
|
||||||
|
@ -50,4 +51,7 @@ def registerUser(request):
|
||||||
router = routers.SimpleRouter()
|
router = routers.SimpleRouter()
|
||||||
router.register(r'users', UserViewSet, basename='users')
|
router.register(r'users', UserViewSet, basename='users')
|
||||||
|
|
||||||
urlpatterns = router.urls
|
urlpatterns = router.urls + [
|
||||||
|
path('token/', token),
|
||||||
|
path('register/', registerUser),
|
||||||
|
]
|
||||||
|
|
Loading…
Reference in a new issue