Question

How to update two files with a single form?

HELLO, I WANTED TO ASK FOR A SITUATION THAT I DID NOT GET IN DJANGO’S TUTORIALS, AND IS, HOW CAN I DO TO FILL OUT A FORM AND BY GIVING THE “SUBMIT” THESE DATA IN ADDITION TO ENTERING THE FILE THAT POINTS THE DORMULARY, ALSO THE YOU CAN ENTER ANOTHER FILE DIRECTLY WITHOUT USING A FORM BUT USING THE SAME INSTANCE.

What I want is to copy records into other files that are not marked on the form. how can I do it?


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

@hansen

Thanks hansen, but it’s not what I need. What I want is something very simple, but I have noticed that there is not much information on this subject. It is about having a form that when you do submit register the data and also take this data and send it directly to another table (model) without having to open or attach a form to get it.

Now if you have any notions of how to do it, I thank you, you can guide me. THANK YOU

@hansen

Many many thanks Hansen, if this is the example I needed, and I can study and understand it clearly.

With this I close the subject, and thanks for your help and dedication

Hi @maxgonpe

I’m not sure if I understand you correctly, but are you asking for uploading multiple files? If yes, then have a look at these: https://docs.djangoproject.com/en/1.11/topics/http/file-uploads/#uploading-multiple-files https://stackoverflow.com/questions/7183830/django-multiple-file-upload

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel