• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Why i can not able to update my data in django

Resolved: Why i can not able to update my data in django

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I can not able to edit data in my django project
settings.py
models.py
view.py
in def_sa_search, I search product id in input box and when i hit enter ,it loaded data and put on html page, but when i change value ,and hit update data button. it doesnot change
Here is my search panel
here product information shown in input box
when i click update data input type button..it doesnot change
Here is my video link:Click


Answer:

If the user is authenticated, the compiler checks that the request method is POST and that your update request method is always POST. So, the compiler always gets into first if and returns the render. If the request is for search or updates it always returns from the first if statements, it will not enter your second if(update code).
So you must have to change the condition for first if.

If you have better answer, please add a comment about this, thank you!

django django-models mysql mysql-workbench
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Vaadin 14.9 – Redirect on Session Destroy Event

26/03/2023

Resolved: How to separate multiple answers in one column, for multiple columns, by creating extra columns

26/03/2023

Resolved: How to set consistent decimal separators in R data frame?

26/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.