feat: implement custom user model with JWT authentication and registration endpoints

This commit is contained in:
Your Name
2026-04-09 14:10:52 +05:30
parent 6bf186806b
commit f1c3b3f9f2
14 changed files with 242 additions and 4 deletions
+14
View File
@@ -0,0 +1,14 @@
from django.urls import path
from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView
from .views import MeView, RegisterView
urlpatterns = [
path("register/", RegisterView.as_view(), name="register"),
# Login and get access and refresh tokens
path("login/", TokenObtainPairView.as_view(), name="token_obtain_pair"),
# Get a new access token using a refresh token
path("refresh/", TokenRefreshView.as_view(), name="token_refresh"),
# Get current user info
path("me/", MeView.as_view(), name="me"),
]