Created
January 19, 2018 15:26
-
-
Save LowerDeez/8a813840b351745d72e1c4b0c05fb036 to your computer and use it in GitHub Desktop.
Django. Render ModelChoice field as quanryset in pug with adding custom data-attrs for option tag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select.ordering__select(data-msg=trans('Заполните поле'), required) | |
+for('item in form.fields.field_name.queryset') | |
option(value=exp('item.pk'), data-price=exp('item.price')) | |
+exp item.title | |
.errors | |
+exp form.delivery_way.errors.as_text() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment