26 lines
907 B
Python
26 lines
907 B
Python
"""
|
|
URL configuration for gnxmail project.
|
|
"""
|
|
from django.contrib import admin
|
|
from django.urls import path, include
|
|
from django.conf import settings
|
|
from django.conf.urls.static import static
|
|
from rest_framework_simplejwt.views import (
|
|
TokenObtainPairView,
|
|
TokenRefreshView,
|
|
)
|
|
|
|
urlpatterns = [
|
|
path('admin/', admin.site.urls),
|
|
path('api/auth/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
|
|
path('api/auth/token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
|
|
path('api/accounts/', include('accounts.urls')),
|
|
path('api/emails/', include('emails.urls')),
|
|
path('api/contacts/', include('contacts.urls')),
|
|
path('api/folders/', include('folders.urls')),
|
|
]
|
|
|
|
if settings.DEBUG:
|
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
|
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|