22 lines
850 B
Python
22 lines
850 B
Python
from django.contrib import admin
|
|
from django.urls import path, include
|
|
from django.shortcuts import redirect
|
|
from django.conf import settings
|
|
from django.conf.urls.static import static
|
|
|
|
urlpatterns = [
|
|
path('admin/', admin.site.urls),
|
|
path('', lambda request: redirect('inventory:dashboard'), name='home'),
|
|
path('accounts/', include('apps.accounts.urls')),
|
|
path('inventory/', include('apps.inventory.urls')),
|
|
path('purchasing/', include('apps.purchasing.urls')),
|
|
path('sales/', include('apps.sales.urls')),
|
|
path('manufacturing/', include('apps.manufacturing.urls')),
|
|
path('reports/', include('apps.reports.urls')),
|
|
path('database/', include('apps.database_management.urls')),
|
|
]
|
|
|
|
# Serve media files in development
|
|
if settings.DEBUG:
|
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|