feat: Use slug to get specialization
This commit is contained in:
@@ -43,7 +43,7 @@ urlpatterns = [
|
||||
path("tierschutzorganisationen/", views.list_rescue_organizations, name="rescue-organizations"),
|
||||
path("tierschutzorganisationen/<int:rescue_organization_id>/", views.detail_view_rescue_organization,
|
||||
name="rescue-organization-detail"),
|
||||
path("tierschutzorganisationen/spezialisierung/<int:species_id>", views.specialized_rescues,
|
||||
path("tierschutzorganisationen/spezialisierung/<slug:species_slug>", views.specialized_rescues,
|
||||
name="specialized-rescue-organizations"),
|
||||
|
||||
# ex: /search/
|
||||
|
@@ -804,8 +804,8 @@ def list_rescue_organizations(request, species=None, template='fellchensammlung/
|
||||
return render(request, template, context=context)
|
||||
|
||||
|
||||
def specialized_rescues(request, species_id):
|
||||
species = get_object_or_404(Species, pk=species_id)
|
||||
def specialized_rescues(request, species_slug):
|
||||
species = get_object_or_404(Species, slug=species_slug)
|
||||
return list_rescue_organizations(request, species)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user