2024-07-08 11:44:39 -04:00
|
|
|
from django.urls import include, re_path, path
|
|
|
|
from django.contrib import admin
|
|
|
|
from django.views.generic import RedirectView, TemplateView
|
2025-01-06 14:25:57 -05:00
|
|
|
from users.views import IsRegistrationDisabled, PublicUserListView, PublicUserDetailView, UserMetadataView, UpdateUserMetadataView, EnabledSocialProvidersView
|
2025-01-18 17:03:03 -05:00
|
|
|
from .views import get_csrf_token, get_public_url, serve_protected_media
|
2024-07-08 11:44:39 -04:00
|
|
|
from drf_yasg.views import get_schema_view
|
|
|
|
from drf_yasg import openapi
|
|
|
|
|
|
|
|
schema_view = get_schema_view(
|
|
|
|
openapi.Info(
|
|
|
|
title='API Docs',
|
|
|
|
default_version='v1',
|
|
|
|
)
|
|
|
|
)
|
|
|
|
urlpatterns = [
|
|
|
|
path('api/', include('adventures.urls')),
|
|
|
|
path('api/', include('worldtravel.urls')),
|
2025-02-23 17:04:20 -05:00
|
|
|
path("auth/", include("allauth.headless.urls")),
|
2024-07-08 11:44:39 -04:00
|
|
|
|
2025-01-18 17:03:03 -05:00
|
|
|
# Serve protected media files
|
|
|
|
re_path(r'^media/(?P<path>.*)$', serve_protected_media, name='serve-protected-media'),
|
|
|
|
|
2024-08-16 12:21:43 -04:00
|
|
|
path('auth/is-registration-disabled/', IsRegistrationDisabled.as_view(), name='is_registration_disabled'),
|
2024-09-08 00:56:52 -04:00
|
|
|
path('auth/users/', PublicUserListView.as_view(), name='public-user-list'),
|
2025-01-29 22:50:53 -05:00
|
|
|
path('auth/user/<str:username>/', PublicUserDetailView.as_view(), name='public-user-detail'),
|
2024-11-30 10:24:27 -05:00
|
|
|
path('auth/update-user/', UpdateUserMetadataView.as_view(), name='update-user-metadata'),
|
2024-07-08 11:44:39 -04:00
|
|
|
|
2024-11-30 10:24:27 -05:00
|
|
|
path('auth/user-metadata/', UserMetadataView.as_view(), name='user-metadata'),
|
2024-11-29 14:41:13 -05:00
|
|
|
|
2025-01-06 14:25:57 -05:00
|
|
|
path('auth/social-providers/', EnabledSocialProvidersView.as_view(), name='enabled-social-providers'),
|
|
|
|
|
2024-07-08 11:44:39 -04:00
|
|
|
path('csrf/', get_csrf_token, name='get_csrf_token'),
|
2025-01-06 18:53:08 -05:00
|
|
|
path('public-url/', get_public_url, name='get_public_url'),
|
2024-11-30 10:24:27 -05:00
|
|
|
|
|
|
|
path('', TemplateView.as_view(template_name='home.html')),
|
|
|
|
|
2024-07-08 11:44:39 -04:00
|
|
|
re_path(r'^admin/', admin.site.urls),
|
|
|
|
re_path(r'^accounts/profile/$', RedirectView.as_view(url='/',
|
|
|
|
permanent=True), name='profile-redirect'),
|
|
|
|
re_path(r'^docs/$', schema_view.with_ui('swagger',
|
|
|
|
cache_timeout=0), name='api_docs'),
|
|
|
|
# path('auth/account-confirm-email/', VerifyEmailView.as_view(), name='account_email_verification_sent'),
|
2024-11-29 14:41:13 -05:00
|
|
|
path("accounts/", include("allauth.urls")),
|
|
|
|
|
2024-12-31 10:38:15 -05:00
|
|
|
path("api/integrations/", include("integrations.urls")),
|
|
|
|
|
2025-01-18 17:03:03 -05:00
|
|
|
# Include the API endpoints:
|
|
|
|
]
|