# backend/urls.py
from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from core.views import HomeView, DashboardView
urlpatterns = [
    # Home & Dashboard
    path('', HomeView.as_view(), name='home'),
    path('dashboard/', DashboardView.as_view(), name='dashboard'),    
    # Students
    path('students/', include('students.urls')),
    # Staff
    path('staff/', include('staff.urls')),    
    # Academics
    path('academics/', include('academics.urls')),
    path('attendance/', include('academics.attendance_urls')),  # THIS LINE IS CRITICAL
    # path('attendance/', include('academics.urls_attendance')),
    # Finance
    path('finance/', include('finance.urls')),    
    # Parents
    path('parents/', include('parents.urls')),    
    # Reports
    path('reports/', include('reports.urls')),    
    # Communication
    path('communication/', include('communication.urls')),    
    # Admin
    path('admin/', admin.site.urls), ]
if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)