How to make filling the form according to the existing data for change If possible, a small piece of code.

    1 answer 1

    A little confusing question. It means to fill in the initial data taken from somewhere?
    Then so:

    def smth(request): # Ключи словаря соответствуют именам полей заполняемой формы initial_data = {'name': 'Ivan', 'surname': 'Ivanov', email: 'ivanov@mail.ru'} some_form = SomeForm(initial=initial_data) 

    Or is it meant something else?

    • on this issue figured out. Thank! - avdoshkin