Use service slug in routing

This commit is contained in:
Tobias Kunze 2025-03-24 15:33:33 +01:00 committed by Tobias Brunner
parent 7411288019
commit 51dcc46f62
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -36,7 +36,7 @@
</div> </div>
<div class="card-footer d-flex justify-content-between"> <div class="card-footer d-flex justify-content-between">
<span></span> <span></span>
<a href="{{ service.pk }}/" class="btn btn-light-primary">{% translate "Read More" %}</a> <a href="{{ service.slug }}/" class="btn btn-light-primary">{% translate "Read More" %}</a>
</div> </div>
</div> </div>
{% empty %} {% empty %}

View file

@ -26,7 +26,7 @@ urlpatterns = [
name="organization.services", name="organization.services",
), ),
path( path(
"services/<int:pk>/", "services/<slug:slug>/",
views.ServiceDetailView.as_view(), views.ServiceDetailView.as_view(),
name="organization.services", name="organization.services",
), ),