mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 08:29:59 +03:00
Update rest_framework/renderers.py
Co-authored-by: Tom Christie <tom@tomchristie.com>
This commit is contained in:
parent
268298397d
commit
d31d428c97
|
@ -344,7 +344,9 @@ class HTMLFormRenderer(BaseRenderer):
|
|||
if 'template' in style:
|
||||
template_name = style['template']
|
||||
else:
|
||||
template_name = style['template_pack'].strip('/') + f"/{style['base_template']}"
|
||||
prefix = style['template_pack'].strip('/')
|
||||
suffix = style['base_template']
|
||||
template_name = f"{prefix}/{suffix}"
|
||||
|
||||
template = loader.get_template(template_name)
|
||||
context = {'field': field, 'style': style}
|
||||
|
|
Loading…
Reference in New Issue
Block a user