Skip to content
Snippets Groups Projects
Unverified Commit 69678ac4 authored by George Hickman's avatar George Hickman
Browse files

Link to Round.fund on Round IndexPage

parent 5f6c472b
No related branches found
No related tags found
No related merge requests found
from django.utils.safestring import mark_safe
from wagtail.contrib.modeladmin.helpers import PermissionHelper
from wagtail.contrib.modeladmin.options import ModelAdmin, ModelAdminGroup
......@@ -28,6 +29,12 @@ class RoundAdmin(BaseRoundAdmin):
list_display = ('title', 'fund', 'start_date', 'end_date', 'sealed')
def fund(self, obj):
url = self.url_helper.get_action_url('edit', obj.fund.id)
url_tag = f'<a href="{url}">{obj.fund}</a>'
return mark_safe(url_tag)
class ScreeningStatusPermissionHelper(PermissionHelper):
def user_can_edit_obj(self, user, obj):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment