fix annotate query

This commit is contained in:
Tuan-Dung Bui 2023-04-17 02:44:48 +07:00
parent c3b7d465b1
commit dfc614ac1e
7 changed files with 70 additions and 51 deletions

View file

@ -219,6 +219,7 @@ else:
}
INSTALLED_APPS += (
"debug_toolbar",
"django.contrib.admin",
"judge",
"django.contrib.auth",
@ -248,6 +249,7 @@ INSTALLED_APPS += (
)
MIDDLEWARE = (
"debug_toolbar.middleware.DebugToolbarMiddleware",
"judge.middleware.SlowRequestMiddleware",
"judge.middleware.ShortCircuitMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
@ -424,11 +426,7 @@ STATIC_URL = "/static/"
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache",
"LOCATION": [
"172.19.26.240:11211",
"172.19.26.242:11212",
"172.19.26.244:11213",
],
"LOCATION": "127.0.0.1:11211",
}
}
@ -490,3 +488,9 @@ except IOError:
pass
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
INTERNAL_IPS = [
# ...
"127.0.0.1",
# ...
]