Edit does not show the data in the input and select Django

0

Again here, I am now locked with the edit, I am sending the form with the model to the model but the input does not take the values, I have the name with the same name as in the model and nothing, I I have guided this example link , the modal that they use there is not the same as the one that I use since it works with the fields of the form. I also have some dynamic select and others not as I could show them with the values.

    
asked by Antonio Veliz 19.10.2017 в 17:01
source

1 answer

0

In order for the data to be loaded when editing, you must necessarily use the tags of the templates, for example {{form.name}} so django shows you in the full inputs. Now from what I see you created the inputs with html by hand, if this is the case you have to put in the value field the value of the field, for example: value="{{form.name.value}}" This way, when the page is rendered, it will show the data in the inputs, greetings.

    
answered by 31.10.2017 / 21:34
source