-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathurls.py
More file actions
66 lines (62 loc) · 2.62 KB
/
urls.py
File metadata and controls
66 lines (62 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path, re_path
from drf_yasg import openapi
from drf_yasg.views import get_schema_view
from rest_framework_simplejwt.views import (
TokenRefreshView,
TokenVerifyView,
)
from core.permissions import IsStaffOrReadOnly
from users.views import GetJWTToken
schema_view = get_schema_view(
openapi.Info(
title="ProCollab API",
default_version="v1",
description="API for ProCollab",
),
public=True,
permission_classes=[IsStaffOrReadOnly],
)
urlpatterns = [
path("admin/", admin.site.urls),
path("api-auth/", include("rest_framework.urls")),
re_path(
r"^swagger(?P<format>\.json|\.yaml)$",
schema_view.without_ui(cache_timeout=0),
name="schema-json",
),
re_path(
r"^swagger/$",
schema_view.with_ui("swagger", cache_timeout=0),
name="schema-swagger-ui",
),
re_path(
r"^redoc/$", schema_view.with_ui("redoc", cache_timeout=0), name="schema-redoc"
),
path("files/", include("files.urls", namespace="files")),
path("industries/", include("industries.urls", namespace="industries")),
path("news/", include("news.urls", namespace="news")),
path("projects/", include("projects.urls", namespace="projects")),
path("vacancies/", include("vacancy.urls", namespace="vacancies")),
path("core/", include("core.urls", namespace="core")),
path("invites/", include("invites.urls", namespace="invites")),
path("auth/", include(("users.urls", "users"), namespace="users")),
path("chats/", include("chats.urls", namespace="chats")),
path("events/", include("events.urls", namespace="events")),
path("programs/", include("partner_programs.urls", namespace="partner_programs")),
path("rate-project/", include(("project_rates.urls", "rate_projects"))),
path("feed/", include("feed.urls", namespace="feed")),
path("alerts/", include("alerts.urls", namespace="alerts")),
path("api/token/", GetJWTToken.as_view(), name="token_obtain_pair"),
path("api/token/refresh/", TokenRefreshView.as_view(), name="token_refresh"),
path("api/token/verify/", TokenVerifyView.as_view(), name="token_verify"),
path("", include("metrics.urls", namespace="metrics")),
path("anymail/", include("anymail.urls")),
path("django_prometheus/", include("django_prometheus.urls")),
]
if settings.DEBUG:
import debug_toolbar
urlpatterns += [path("__debug__/", include(debug_toolbar.urls))]
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)