Optimize problem feed DB query

This commit is contained in:
cuom1999 2022-10-28 21:29:48 -05:00
parent cffb76e220
commit 45b844d6c9
6 changed files with 20 additions and 47 deletions

View file

@ -1,14 +0,0 @@
import time
def timeit(method):
def timed(*args, **kw):
ts = time.time()
result = method(*args, **kw)
te = time.time()
if "log_time" in kw:
name = kw.get("log_name", method.__name__.upper())
kw["log_time"][name] = int((te - ts) * 1000)
return result
return timed

View file

@ -1090,6 +1090,7 @@ urlpatterns = [
]
),
),
# url("__debug__/", include("debug_toolbar.urls")), # debug_toolbar use
] + url_static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
favicon_paths = [