Hey there,
i have the following Problem with Django:
I am using row Queries with the connection module. Now i faced the Problem that after updating my Database, i still get the same Data until i restart the Django Server. I tried to use after every Query Select cursor.close(), but i did not work.
I think there must be a Cache in Django, which i have to disable. Do anyone know how i can solve this?
You’re going to need to post the code here that is involved. There are too many reasons why this might be happening for us to guess at the reasons.
(The most likely reason is that you’ve got your query code in the wrong location - but again, we’ll need to see the code.)
Note, when posting code here, enclose each block of code between lines of three backtick - ` characters. This means you’ll have a line of ```, then your code, then another line of ```. This forces the forum software to keep your code properly formatted, which is critical with Python. (Do not post screenshots or images of code.)
You show the first line as:
What is above this line in this view? Is it only the def ...
line or was there more?
This is a part of a view for updating the data, but you’re asking about a view not showing the updated data. What is that view?
So it’s the view that is supposed to be showing the updated data that we need to see.
Yes, that’s right. But it does not display the data in the browser, it is exporting it as an excel sheet
(“Yes, that’s right.” was too short as an answer, that’s why i repeated the Export)
Still it’s the same question. What is the view that is retrieving the data and presenting it as a file to the browser?
It is the second view…
I don’t see anything in that view that is returning anything to the browser. I see a redirect to another url.
Maybe I’m just not understanding what you’re trying to describe here as the issue.
It is this code that I need to see.
Is this the code that you are saying is always returning the same data between restarts?
If so, what is this fct
object?
Please open a new issue for this. This does not appear to be related to this topic.