demo-backend/todos/urls.py

13 lines
383 B
Python
Raw Normal View History

2025-01-16 14:20:20 +01:00
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import TodoViewSet, register_user, login_user
router = DefaultRouter()
router.register(r'todos', TodoViewSet, basename='todo')
urlpatterns = [
path('', include(router.urls)),
path('register/', register_user, name='register'),
path('login/', login_user, name='login'),
]