Fix TemplateDoesNotExist when using django-nested-admin by returning custom template for other third-party packages. #341 (#342)

This commit is contained in:
Andrey authored and GitHub committed 2023-12-28 17:43:56 +01:00
1 parent ff0380977e
commit 6a7a230964
2 files changed
+7

No files matched your search

@@ -74,6 +74,9 @@ def get_admin_interface_setting(setting):
@register.simple_tag()
def get_admin_interface_inline_template(template):
template_path = template.split("/")
if template_path[0] != "admin":
# return costume inline template for other packages
return template
template_path[-1] = "headerless_" + template_path[-1]
return "/".join(template_path)