Files @ bb2eab2968aa
Branch filter:

Location: website/conservancy/fossy/urls.py

bsturmfels
fossy: check UUID format in the URL routing to avoid unhandled exception

Requests like /fossy/xyz123/ were causing an error due to "xyz123" not being a
valid UUID. We should just return a 404 in this case, which the URL routing will
now do automatically.
1
2
3
4
5
6
7
8
from django.urls import path

from .views import CommunityTrackProposalCreateView, CommunityTrackProposalThanksView

urlpatterns = [
    path('community-tracks/', CommunityTrackProposalCreateView.as_view(), name='fossy-add'),
    path('<uuid:pk>/', CommunityTrackProposalThanksView.as_view(), name='fossy-thanks'),
]