2020-06-06 13:33:39 +02:00
|
|
|
from oshipka.persistance import db, ModelController, index_service
|
2020-06-03 18:11:37 +02:00
|
|
|
|
|
|
|
[%- if imports %]
|
|
|
|
[%- for import in imports %]
|
|
|
|
[[ import ]]
|
|
|
|
[%- endfor %]
|
|
|
|
[%- endif %]
|
2020-06-03 16:00:51 +02:00
|
|
|
|
2020-06-04 15:24:18 +02:00
|
|
|
[%- if type == 'm_n' %]
|
|
|
|
[% include "_model_m_n_py" %]
|
|
|
|
[%- else %]
|
|
|
|
[% include "_model_py" %]
|
2020-06-06 13:33:39 +02:00
|
|
|
[%- endif %]
|
|
|
|
|
|
|
|
[%- if searchable %]
|
|
|
|
index_service.searchables.append([[ name ]])
|
2020-06-04 15:24:18 +02:00
|
|
|
[%- endif %]
|