diff options
author | Magnus Hagander | 2019-08-20 11:11:21 +0000 |
---|---|---|
committer | Magnus Hagander | 2019-08-21 09:40:33 +0000 |
commit | 47e6d883834df4f135e600d1543a45ff10c5963c (patch) | |
tree | 3673d1437fda91305ffb5706d7e473a6a2c43e89 /postgresqleu/util/backendviews.py | |
parent | 5fda42c09e013cab5341de49f5fd966980fdc032 (diff) |
Add ability to add a CSS class to each individual row in backend lists
Diffstat (limited to 'postgresqleu/util/backendviews.py')
-rw-r--r-- | postgresqleu/util/backendviews.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/postgresqleu/util/backendviews.py b/postgresqleu/util/backendviews.py index 539595d7..87f04e5e 100644 --- a/postgresqleu/util/backendviews.py +++ b/postgresqleu/util/backendviews.py @@ -250,7 +250,11 @@ def backend_list_editor(request, urlname, formclass, resturl, allow_new=True, al else: raise Http404() - values = [{'id': o.pk, 'vals': [getattr(o, '_display_{0}'.format(f), getattr(o, f)) for f in formclass.list_fields]} for o in objects] + values = [{ + 'id': o.pk, + 'vals': [getattr(o, '_display_{0}'.format(f), getattr(o, f)) for f in formclass.list_fields], + 'rowclass': formclass.get_rowclass(o), + } for o in objects] return render(request, 'confreg/admin_backend_list.html', { 'conference': conference, |