|
| 1 | +"""purl_sync URL Configuration |
| 2 | +
|
| 3 | +The `urlpatterns` list routes URLs to views. For more information please see: |
| 4 | + https://docs.djangoproject.com/en/4.1/topics/http/urls/ |
| 5 | +Examples: |
| 6 | +Function views |
| 7 | + 1. Add an import: from my_app import views |
| 8 | + 2. Add a URL to urlpatterns: path('', views.home, name='home') |
| 9 | +Class-based views |
| 10 | + 1. Add an import: from other_app.views import Home |
| 11 | + 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') |
| 12 | +Including another URLconf |
| 13 | + 1. Import the include() function: from django.urls import include, path |
| 14 | + 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) |
| 15 | +""" |
| 16 | +from django.conf import settings |
| 17 | +from django.conf.urls.static import static |
| 18 | +from django.contrib import admin |
| 19 | +from django.contrib.auth.views import LogoutView |
| 20 | +from django.urls import include |
| 21 | +from django.urls import path |
| 22 | + |
| 23 | +from review.views import CreatGitView |
| 24 | +from review.views import DatabaseAdminView |
| 25 | +from review.views import GitRepoListView |
| 26 | +from review.views import ReviewListView |
| 27 | +from review.views import ReviewView |
| 28 | +from review.views import SecurityTeamInbox |
| 29 | +from review.views import SecurityTeamOutbox |
| 30 | +from review.views import SecurityTeamSignUp |
| 31 | +from review.views import SecurityTeamView |
| 32 | +from review.views import UserLogin |
| 33 | +from review.views import WebfingerView |
| 34 | +from review.views import create_review |
| 35 | +from review.views import database_admin_inbox |
| 36 | +from review.views import database_admin_outbox |
| 37 | +from review.views import note_vote |
| 38 | +from review.views import review_vote |
| 39 | + |
| 40 | +urlpatterns = [ |
| 41 | + path("admin/", admin.site.urls), |
| 42 | + path(".well-known/webfinger", WebfingerView.as_view(), name="web-finger"), |
| 43 | + path("security-team/@<str:slug>", SecurityTeamView.as_view(), name="security-team-profile"), |
| 44 | + path("database-admin/@<str:slug>", DatabaseAdminView.as_view(), name="database-admin-profile"), |
| 45 | + path("accounts/sign-up", SecurityTeamSignUp.as_view(), name="signup"), |
| 46 | + path("accounts/login", UserLogin.as_view(), name="login"), |
| 47 | + path("accounts/logout", LogoutView.as_view(next_page="login"), name="logout"), |
| 48 | + path("create-repo", CreatGitView.as_view(), name="repo-create"), |
| 49 | + path("create-review", create_review), |
| 50 | + path("review/<uuid:id>/", ReviewView.as_view(), name="review-page"), |
| 51 | + path("review-list", ReviewListView.as_view()), |
| 52 | + path("repo-list", GitRepoListView.as_view()), |
| 53 | + path("review/<uuid:review_id>/votes/", review_vote, name="vote-review"), |
| 54 | + path("note/<uuid:note_id>/votes/", note_vote, name="vote-note"), |
| 55 | + path("security-team/<str:username>/inbox/", SecurityTeamInbox.as_view()), |
| 56 | + path("security-team/<str:username>/outbox/", SecurityTeamOutbox.as_view()), |
| 57 | + path("database-admin/<str:username>/outbox/", database_admin_outbox), |
| 58 | + path("database-admin/<str:username>/inbox/", database_admin_inbox), |
| 59 | + # path("security-team/@<str:username>/edit-followers/", database_admin_profile_view), |
| 60 | + # path("database-admin/<str:username>/followers/", ), |
| 61 | + # path("security-team/<str:username>/following/", ), |
| 62 | + path("o/", include("oauth2_provider.urls", namespace="oauth2_provider")), |
| 63 | +] |
| 64 | + |
| 65 | +if settings.DEBUG: |
| 66 | + urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) |
0 commit comments