from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from .views import root_redirect
from django.views.static import serve
from accounts.views import login_view

urlpatterns = [
    path("", login_view), 
    path('admin/', admin.site.urls),
    path('accounts/', include('accounts.urls')),
    path('tenants/', include('tenants.urls')),
    path('maintenance/', include('maintenance.urls')),
    path('payments/', include('payments.urls')),
    path('reports/', include('reports.urls')),
    path('properties/', include('properties.urls')),
    path('media/', serve, {'document_root': settings.MEDIA_ROOT}),
]
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
