first commit

This commit is contained in:
pacnpal
2024-10-28 17:09:57 -04:00
commit 2e1b4d7af7
9993 changed files with 1182741 additions and 0 deletions

40
thrillwiki/urls.py Normal file
View File

@@ -0,0 +1,40 @@
from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from accounts import views as accounts_views
from django.views.generic import TemplateView
from .views import HomeView, SearchView
urlpatterns = [
path('admin/', admin.site.urls),
# Main app URLs
path('', HomeView.as_view(), name='home'),
path('parks/', include('parks.urls')),
path('rides/', include('rides.urls')),
path('reviews/', include('reviews.urls')),
path('companies/', include('companies.urls')),
path('search/', SearchView.as_view(), name='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'),
# Authentication URLs
path('accounts/', include('allauth.urls')), # This includes social auth URLs
path('accounts/email-required/', accounts_views.email_required, name='email_required'),
# User profile URLs
path('users/<str:username>/', accounts_views.ProfileView.as_view(), name='user_profile'),
path('user/<str:username>/', accounts_views.ProfileView.as_view(), name='single_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'),
# Include remaining accounts URLs
path('', include('accounts.urls')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
handler404 = 'thrillwiki.views.handler404'
handler500 = 'thrillwiki.views.handler500'