"""
URL configuration for job_portal project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/6.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from django.conf import settings # Settings ko use karne ke liye
from django.conf.urls.static import static # Ye wali line missing thi bhai!
from django.views.generic import TemplateView
from django.conf.urls import handler404, handler500

urlpatterns = [
    path('accounts/', include('allauth.urls')),
    path('secret-entry/', admin.site.urls),
    path('travels/', include('travels.urls')),
    path('study/', include('study.urls')),
    path('', include('blog.urls')),
    path('', include('jobs.urls')),
    path('ckeditor/', include('ckeditor_uploader.urls')),
    
    # # ✈️ Travels Module ke liye naya path
    # path('travels/', include('travels.urls')),
    
    # # 🎓 Study Module ke liye naya path
    # path('study/', include('study.urls')),
    
    
]

handler404 = TemplateView.as_view(template_name='pages/404.html')
handler500 = TemplateView.as_view(template_name='pages/500.html')

# Ye line ensure karti hai ki images browser mein dikhen
if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)