How to make django automatically fill in a form field with information from another model that is in the database [duplicate]
`Good morning, I am building a system to manage the company I work for, however, I am facing a problem, as I need a certain field in the contract form to be already filled in with the process number to which it belongs, in this case, when I am going to register this contract, this registration is done by the process, by a button that sends to the contract template, which is more precise than the process number (it would be something like the name of the process, different from the primary key) at this moment I need the form is already loaded with the process number, and the user just enters the rest of the information, and saves. Below are my models, views, forms and templates. models
i am using cbv to make this sistem