Fix TemplateDoesNotExist when using django-nested-admin by returning custom template for other third-party packages. #341 (#342)
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user