B
B
beginer02020-05-02 13:02:18
Django
beginer0, 2020-05-02 13:02:18

How to save default data in other fields of the table with POST request?

There is a model "goods" with the fields: "name", "income", "expenditure", "balance". on the page of the filling form there is only the name and parish. it is necessary that, along with the data of the name and income, the values ​​\u200b\u200bof the expense and balance fields are also saved in the database (in "expense" by default "0", in "residual" the same value as in "income")

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sanya Hihi Haha, 2020-05-02
@ValarMayar

Well, to prescribe logic in the view, no?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question