diff options
author | 2020-09-18 04:30:05 +1000 | |
---|---|---|
committer | 2020-09-18 04:30:05 +1000 | |
commit | 2029cf511ee61d48eca94811e6e891a6c827de7e (patch) | |
tree | 8f8432b84cc8eb7fa41a53af7149d342e291c813 | |
parent | Merge branch 'master' into admin-api-pages-improvements (diff) |
Remove TagAdmin model as Tags were removed from site.
-rw-r--r-- | pydis_site/apps/api/admin.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/pydis_site/apps/api/admin.py b/pydis_site/apps/api/admin.py index 271ff119..4bf2a6ee 100644 --- a/pydis_site/apps/api/admin.py +++ b/pydis_site/apps/api/admin.py @@ -242,29 +242,6 @@ class RoleAdmin(admin.ModelAdmin): permissions_with_calc_link.short_description = "Permissions" -class TagAdmin(admin.ModelAdmin): - """Admin formatting for the Tag model.""" - - fields = ("title", "embed", "preview") - readonly_fields = ("preview",) - search_fields = ("title", "embed") - - @staticmethod - def preview(instance: Tag) -> Optional[str]: - """Render tag markdown contents to preview actual appearance.""" - if instance.embed: - import markdown - return format_html( - markdown.markdown( - instance.embed["description"], - extensions=[ - "markdown.extensions.nl2br", - "markdown.extensions.extra" - ] - ) - ) - - class StaffRolesFilter(admin.SimpleListFilter): """Filter options for Staff Roles.""" |