from django.contrib import admin
from django.urls import path, include
from django.views.generic import RedirectView
from django.conf import settings
from django.conf.urls.static import static
from django.conf.urls import handler403, handler404

handler403 = 'core.views.error_403'
handler404 = 'core.views.error_404'

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', RedirectView.as_view(pattern_name='finance:dashboard', permanent=False)),
    path('accounts/', include('accounts.urls')),
    path('business/', include('business.urls')),
    path('core/', include('core.urls')),
    path('finance/', include('finance.urls')),
    path('inventory/', include('inventory.urls')),
    path('sales/', include('sales.urls')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
