This commit is contained in:
33
backend/core/urls.py
Normal file
33
backend/core/urls.py
Normal file
@@ -0,0 +1,33 @@
|
||||
# backend/core/urls.py
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
from rest_framework_simplejwt.views import (
|
||||
TokenObtainPairView,
|
||||
TokenRefreshView,
|
||||
)
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
|
||||
# Uključujemo rute iz modula (svaki modul ima svoj urls.py)
|
||||
path('api/crm/', include('modules.crm.urls')),
|
||||
path('api/invoicing/', include('modules.invoicing.urls')),
|
||||
path('api/tasks/', include('modules.task_management.urls')),
|
||||
path('api/fleet/', include('modules.fleet.urls')),
|
||||
|
||||
# JWT Auth rute
|
||||
path('api/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
|
||||
path('api/token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
|
||||
|
||||
# KORISNICI - registriramo ovdje
|
||||
path('api/users/', include('core.users.urls')),
|
||||
]
|
||||
|
||||
if settings.DEBUG:
|
||||
import debug_toolbar
|
||||
urlpatterns += [
|
||||
path('__debug__/', include(debug_toolbar.urls)),
|
||||
]
|
||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
Reference in New Issue
Block a user