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
|
|
|
|
from django.conf import settings
|
|
|
|
from django.conf.urls.static import static
|
2024-11-30 10:24:27 -05:00
|
|
|
from users.views import IsRegistrationDisabled, PublicUserListView, PublicUserDetailView, UserMetadataView, UpdateUserMetadataView
|
2024-07-08 11:44:39 -04:00
|
|
|
from .views import get_csrf_token
|
|
|
|
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')),
|
2024-11-30 10:24:27 -05:00
|
|
|
path("_allauth/", include("allauth.headless.urls")),
|
2024-07-08 11:44:39 -04:00
|
|
|
|
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'),
|
|
|
|
path('auth/user/<uuid:user_id>/', 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
|
|
|
|
2024-07-08 11:44:39 -04:00
|
|
|
path('csrf/', get_csrf_token, name='get_csrf_token'),
|
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")),
|
|
|
|
|
2024-11-29 14:41:13 -05:00
|
|
|
# Include the API endpoints:
|
2024-11-30 10:24:27 -05:00
|
|
|
|
2024-07-08 11:44:39 -04:00
|
|
|
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|