27 lines
703 B
Python
27 lines
703 B
Python
"""
|
|
URL configuration for Website Analyzer project.
|
|
"""
|
|
|
|
from django.contrib import admin
|
|
from django.urls import path, include
|
|
from django.views.generic import TemplateView
|
|
from django.shortcuts import render
|
|
|
|
|
|
def scan_detail_view(request, scan_id):
|
|
"""View for scan detail page that passes scan_id to template."""
|
|
return render(request, 'scan_detail.html', {'scan_id': str(scan_id)})
|
|
|
|
|
|
urlpatterns = [
|
|
# Admin
|
|
path('admin/', admin.site.urls),
|
|
|
|
# API endpoints
|
|
path('api/', include('api.urls')),
|
|
|
|
# Frontend views
|
|
path('', TemplateView.as_view(template_name='index.html'), name='home'),
|
|
path('scan/<uuid:scan_id>/', scan_detail_view, name='scan_detail'),
|
|
]
|