oshipka/vm_gen/templates/_model_choice_header_py

13 lines
419 B
Plaintext
Raw Permalink Normal View History

2020-06-03 16:00:51 +02:00
[%- if _choice_types %]
[%- for choice_type in _choice_types %]
[%- for key in choice_type.choices.keys() %]
[[ choice_type.name|upper ]]_TYPE_[[ key ]] = "[[ key ]]"
[%- endfor %]
[[ choice_type.name ]] = [
[%- for key, value in choice_type.choices.items() %]
([[ choice_type.name|upper ]]_TYPE_[[ key ]], u'[[ value ]]'),
[%- endfor %]
]
[%- endfor %]
[%- endif %]