2020-06-04 18:02:34 +02:00
|
|
|
<form action="{{ url_for('create_[[ name|camel_to_snake ]]') }}" method="post">
|
|
|
|
<input type="hidden" name="_next" value="{{ url_for('list_[[ name|camel_to_snake ]]') }}"/>
|
|
|
|
[%- for column in columns %]
|
2020-06-06 13:33:39 +02:00
|
|
|
<label for="input-[[ name|camel_to_snake ]]-[[ column.name ]]">[[ column.name ]]</label>:
|
|
|
|
[%- if column.type in ['relationship'] %]
|
|
|
|
<input id="input-[[ name|camel_to_snake ]]-[[ column.name ]]"
|
|
|
|
type="number" name="[[ column.name ]]_id" autocomplete="off"
|
|
|
|
/>
|
|
|
|
[%- else %]
|
|
|
|
<input id="input-[[ name|camel_to_snake ]]-[[ column.name ]]"
|
|
|
|
type="text" name="[[ column.name ]]" autocomplete="off"
|
|
|
|
/>
|
|
|
|
[%- endif %]
|
2020-06-04 18:02:34 +02:00
|
|
|
[%- endfor %]
|
|
|
|
<input type="submit">
|
|
|
|
</form>
|