0

In django I can find a lot of examples of reading a database and displaying the data accordingly on a webpage. I can find no example of writing back to the database though (according to user input, or to the result of a computation). Can you point me to example code, or a tutorial or help me on how to do this?

1 Answer 1

1

If your question is concerned about inserting data in the db, You can write back to the database in Django through views.py. You can refer to these:

Otherwise, you can also write data directly using the \admin site. If you're looking to write data from the webpage, you can check out how forms work in Django. I hope that helps.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.