C
C
Cyber_bober2016-11-29 15:08:38
Django
Cyber_bober, 2016-11-29 15:08:38

How to display the current value of fields in modelForms?

Hello, I'm displaying form fields using hardcode, how can I substitute the current values ​​that are stored in the database into value?

<input id="id_title" maxlength="100" name="title" type="text" required="" value="текущее_значение_из_базы">

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2016-11-29
@Cyber_bober

stackoverflow.com/questions/2236691/display-value-...
{{ form.field.value|default_if_none:"" }}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question