|
| 1 | +# |
| 2 | +# Copyright (c) nexB Inc. and others. All rights reserved. |
| 3 | +# VulnerableCode is a trademark of nexB Inc. |
| 4 | +# SPDX-License-Identifier: Apache-2.0 |
| 5 | +# See http://www.apache.org/licenses/LICENSE-2.0 for the license text. |
| 6 | +# See https://github.com/nexB/vulnerablecode for support or download. |
| 7 | +# See https://aboutcode.org for more information about nexB OSS projects. |
| 8 | +# |
1 | 9 | from django.conf import settings |
2 | 10 | from django.conf.urls.static import static |
3 | 11 | from django.contrib import admin |
|
28 | 36 | from review.views import comment_vote |
29 | 37 | from review.views import fetch_repository_file |
30 | 38 | from review.views import redirect_repository |
| 39 | +from review.views import redirect_vulnerability |
31 | 40 | from review.views import review_vote |
32 | 41 |
|
33 | 42 | urlpatterns = [ |
|
53 | 62 | path("notes/<uuid:note_id>/votes/", comment_vote, name="comment-votes"), |
54 | 63 | path("repository/<uuid:repository_id>/", redirect_repository, name="repository-page"), |
55 | 64 | path("repository/<uuid:repository_id>/fetch", fetch_repository_file, name="repository-fetch"), |
56 | | - path("notes/<uuid:uuid>/", NoteView.as_view(), name="note-page"), |
| 65 | + path( |
| 66 | + "vulnerability/<uuid:vulnerability_id>/", redirect_vulnerability, name="vulnerability-page" |
| 67 | + ), |
| 68 | + path("notes/<uuid:uuid>", NoteView.as_view(), name="note-page"), |
57 | 69 | path("/api/v0/users/@<str:username>/outbox/", PersonOutbox.as_view(), name="user-outbox"), |
58 | 70 | path("/api/v0/users/@<str:username>/outbox/", PersonInbox.as_view(), name="user-inbox"), |
59 | 71 | path("/api/v0/purls/@<path:purl_string>/inbox/", PurlInbox.as_view(), name="purl-inbox"), |
|
72 | 84 | path("o/", include("oauth2_provider.urls", namespace="oauth2_provider")), |
73 | 85 | ] |
74 | 86 |
|
| 87 | + |
75 | 88 | if settings.DEBUG: |
76 | 89 | urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) |
0 commit comments