mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 16:51:07 -05:00
- Created critical functionality audit report identifying 7 critical issues affecting production readiness. - Added design assessment report highlighting exceptional design quality and minor cosmetic fixes needed. - Documented non-authenticated features testing results confirming successful functionality and public access. - Implemented ride search form with autocomplete functionality and corresponding templates for search results. - Developed tests for ride autocomplete functionality, ensuring proper filtering and authentication checks.
86 lines
3.2 KiB
Python
86 lines
3.2 KiB
Python
from django.contrib import admin
|
|
from django.urls import path, include
|
|
from django.conf import settings
|
|
from django.conf.urls.static import static
|
|
from django.views.static import serve
|
|
from accounts import views as accounts_views
|
|
from django.views.generic import TemplateView
|
|
from .views import HomeView, SearchView
|
|
from . import views
|
|
from autocomplete import urls as autocomplete_urls
|
|
import os
|
|
|
|
urlpatterns = [
|
|
path("admin/", admin.site.urls),
|
|
# Main app URLs
|
|
path("", HomeView.as_view(), name="home"),
|
|
# Autocomplete URLs (must be before other URLs)
|
|
path("ac/", autocomplete_urls),
|
|
# Parks and Rides URLs
|
|
path("parks/", include("parks.urls", namespace="parks")),
|
|
# Global rides URLs
|
|
path("rides/", include("rides.urls", namespace="rides")),
|
|
# Other URLs
|
|
path("reviews/", include("reviews.urls")),
|
|
path("companies/", include("companies.urls")),
|
|
path("designers/", include("designers.urls", namespace="designers")),
|
|
path("photos/", include("media.urls", namespace="photos")), # Add photos URLs
|
|
path("search/", include("search.urls", namespace="search")),
|
|
path(
|
|
"terms/", TemplateView.as_view(template_name="pages/terms.html"), name="terms"
|
|
),
|
|
path(
|
|
"privacy/",
|
|
TemplateView.as_view(template_name="pages/privacy.html"),
|
|
name="privacy",
|
|
),
|
|
# Custom authentication URLs first (to override allauth defaults)
|
|
path("accounts/", include("accounts.urls")),
|
|
# Default allauth URLs (for social auth and other features)
|
|
path("accounts/", include("allauth.urls")),
|
|
path(
|
|
"accounts/email-required/", accounts_views.email_required, name="email_required"
|
|
),
|
|
# User profile URLs
|
|
path(
|
|
"user/<str:username>/",
|
|
accounts_views.ProfileView.as_view(),
|
|
name="user_profile",
|
|
),
|
|
path(
|
|
"profile/<str:username>/", accounts_views.ProfileView.as_view(), name="profile"
|
|
),
|
|
path("settings/", accounts_views.SettingsView.as_view(), name="settings"),
|
|
# Redirect /user/ to the user's profile if logged in
|
|
path("user/", accounts_views.user_redirect_view, name="user_redirect"),
|
|
# Moderation URLs - placed after other URLs but before static/media serving
|
|
path("moderation/", include("moderation.urls", namespace="moderation")),
|
|
path("history/", include("history.urls", namespace="history")),
|
|
path(
|
|
"env-settings/",
|
|
views***REMOVED***ironment_and_settings_view,
|
|
name="environment_and_settings",
|
|
),
|
|
]
|
|
|
|
# Serve static files in development
|
|
if settings.DEBUG:
|
|
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
|
|
|
# Serve test coverage reports in development
|
|
coverage_dir = os.path.join(settings.BASE_DIR, 'tests', 'coverage_html')
|
|
if os.path.exists(coverage_dir):
|
|
urlpatterns += [
|
|
path('coverage/', serve, {
|
|
'document_root': coverage_dir,
|
|
'path': 'index.html'
|
|
}),
|
|
path('coverage/<path:path>', serve, {
|
|
'document_root': coverage_dir,
|
|
}),
|
|
]
|
|
|
|
handler404 = "thrillwiki.views.handler404"
|
|
handler500 = "thrillwiki.views.handler500"
|