Fix master template bug when no form in context
This commit is contained in:
parent
5a7deadba2
commit
e7b8b6e818
|
@ -6,9 +6,11 @@
|
|||
<script type="text/javascript">
|
||||
|
||||
## declare extra data needed by form
|
||||
% if form is not Undefined:
|
||||
% for key, value in form.json_data.items():
|
||||
${form.component_studly}Data.${key} = ${json.dumps(value)|n}
|
||||
% endfor
|
||||
% endif
|
||||
|
||||
% if master.deletable and instance_deletable and master.has_perm('delete') and master.delete_confirm == 'simple':
|
||||
|
||||
|
@ -21,7 +23,9 @@
|
|||
% endif
|
||||
</script>
|
||||
|
||||
% if form is not Undefined:
|
||||
${form.render_included_templates()}
|
||||
% endif
|
||||
|
||||
</%def>
|
||||
|
||||
|
|
Loading…
Reference in a new issue