Задать вопрос

Тел: +7 965 3737 888

518

Просмотров

2

Ответов

SQL Log Middleware + duplicates

This is based on Snippet 161 It marks duplicated SQL queries.

To avoid duplicates read:

Caching and Queryset

Sept. 07: Updated for current trunk: 'response' behaves like 'response.header' 22. October '07: Log into directory.

Вопрос полезен? Да0/Нет0
file_4675.py(3.5Кб)
None

Ответы (2):

Ответguettli:15.11.2007
Ответ полезен? Да0/Нет0

Yes, you are right. Saving state information in the middleware objects is not good. This flag should be set on the request objects. I will update this snippet sometime.

Ответdaevaorn:15.11.2007
Ответ полезен? Да0/Нет0

Hmmm...As I know middleware instance shared between working threads, so start attribute may not be correspond to this request. I think that start must be assigned to request object.