From 7415f6d1bc6a99452c9e7459979164ef217f4b1f Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 7 Apr 2022 11:04:28 +0700 Subject: [PATCH] did: small improvment for Term browse view --- basxconnect/core/urls.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/basxconnect/core/urls.py b/basxconnect/core/urls.py index e423ed96..441b25f7 100644 --- a/basxconnect/core/urls.py +++ b/basxconnect/core/urls.py @@ -1,6 +1,6 @@ from bread import views as breadviews from bread.utils.urls import autopath, default_model_paths, model_urlname, reverse_model -from bread.views import AddView, EditView +from bread.views import AddView, BrowseView, EditView from django.views.generic import RedirectView import basxconnect.core.views.tag_views @@ -121,7 +121,10 @@ *default_model_paths( models.Term, addview=AddView._with(fields=["term", "vocabulary"]), - browseview=TermsBrowseView, + editview=EditView._with(fields=["term", "slug"]), + browseview=TermsBrowseView._with( + rowclickaction=BrowseView.gen_rowclickaction("edit") + ), ), *default_model_paths( models.Vocabulary,