D
D
Dmitry2017-05-01 18:00:06
PostgreSQL
Dmitry, 2017-05-01 18:00:06

Why is there no data update in django Queryset?

The project has a database query based on standard Django ORM filters and aggregators that filters and reads data. Problem: when adding new data, recalculation does not occur. Where to "dig"? The recalculation only happens after django is reloaded.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrei Ramanchyk, 2017-05-02
@jagrmi

Queryset, as I understand it, is some kind of unfulfilled request. It refers to the database only in a number of cases (for example, iteration, etc.).
I created an example in the view,
but the database will only be accessed when, for example,
I iterate
for i in types_module:
print(i)
Specify your question, probably not very clear.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question