Skip to content

Commit

Permalink
add: support for modelhref kwargs in gen_rowclickaction
Browse files Browse the repository at this point in the history
  • Loading branch information
saemideluxe committed Jan 4, 2022
1 parent c854db1 commit 60b4039
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bread/views/browse.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def get_queryset(self):
return qs

@staticmethod
def gen_rowclickaction(modelaction):
def gen_rowclickaction(modelaction, **kwargs):
"""
Shortcut to get a Link to a model view.
The default models views in bread are "read", "edit", "delete".
Expand All @@ -273,9 +273,7 @@ def gen_rowclickaction(modelaction):
return Link(
label="",
href=ModelHref(
hg.C("row"),
modelaction,
kwargs={"pk": hg.C("row.pk")},
hg.C("row"), modelaction, kwargs={"pk": hg.C("row.pk")}, **kwargs
),
iconname=None,
)
Expand Down

0 comments on commit 60b4039

Please sign in to comment.