Internal
Public Access
42 lines
1.4 KiB
Python
42 lines
1.4 KiB
Python
"""
|
|
URL configuration for KeepItGoing.
|
|
"""
|
|
|
|
from django.contrib import admin
|
|
from django.urls import path, include
|
|
from django.conf import settings
|
|
from django.conf.urls.static import static
|
|
|
|
from users.urls import api_urlpatterns as users_api_urls, web_urlpatterns as users_web_urls
|
|
from tasks.urls import api_urlpatterns as tasks_api_urls, web_urlpatterns as tasks_web_urls
|
|
from sync.urls import api_urlpatterns as sync_api_urls
|
|
from notifications.urls import api_urlpatterns as notifications_api_urls
|
|
from tasks.views_debug import debug_user_agent
|
|
from .views import api_root
|
|
|
|
urlpatterns = [
|
|
# Admin
|
|
path('admin/', admin.site.urls),
|
|
|
|
# Debug endpoint (remove in production)
|
|
path('debug/user-agent/', debug_user_agent, name='debug-user-agent'),
|
|
|
|
# API root
|
|
path('api/', api_root, name='api-root'),
|
|
|
|
# API endpoints
|
|
path('api/users/', include(users_api_urls)),
|
|
path('api/tasks/', include(tasks_api_urls)),
|
|
path('api/sync/', include(sync_api_urls)),
|
|
path('api/notifications/', include(notifications_api_urls)),
|
|
|
|
# Web views
|
|
path('', include(tasks_web_urls)), # Dashboard at root
|
|
path('', include(users_web_urls)), # Login, register, profile
|
|
]
|
|
|
|
# Serve media files in development
|
|
if settings.DEBUG:
|
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
|
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|