forked from GithubBackups/healthchecks
Merge pull request #166 from MounirMesselmeni/patch-2
Use mark_safe to use html in users list admin
This commit is contained in:
commit
45a8bd0df1
@ -96,6 +96,7 @@ class HcUserAdmin(UserAdmin):
|
||||
|
||||
ordering = ["-id"]
|
||||
|
||||
@mark_safe
|
||||
def engagement(self, user):
|
||||
result = ""
|
||||
num_checks = Check.objects.filter(user=user).count()
|
||||
@ -117,14 +118,11 @@ class HcUserAdmin(UserAdmin):
|
||||
|
||||
return result
|
||||
|
||||
engagement.allow_tags = True
|
||||
|
||||
@mark_safe
|
||||
def checks(self, user):
|
||||
url = reverse("hc-switch-team", args=[user.username])
|
||||
return "<a href='%s'>Checks</a>" % url
|
||||
|
||||
checks.allow_tags = True
|
||||
|
||||
def send_report(self, request, qs):
|
||||
for user in qs:
|
||||
user.profile.send_report()
|
||||
|
Loading…
x
Reference in New Issue
Block a user