.
This commit is contained in:
@@ -196,6 +196,10 @@ CORS_ORIGIN_ALLOW_ALL = True
|
|||||||
|
|
||||||
CACHES = {
|
CACHES = {
|
||||||
'default': {
|
'default': {
|
||||||
|
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
|
||||||
|
'LOCATION': '127.0.0.1:11211',
|
||||||
|
},
|
||||||
|
'filesystem': {
|
||||||
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
|
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
|
||||||
'LOCATION': '/var/tmp/django_cache',
|
'LOCATION': '/var/tmp/django_cache',
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-1
@@ -1,6 +1,9 @@
|
|||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
from . import views
|
from . import views
|
||||||
|
|
||||||
|
from django.views.decorators.cache import cache_page
|
||||||
|
|
||||||
|
|
||||||
app_name = "rapids"
|
app_name = "rapids"
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
@@ -51,7 +54,7 @@ urlpatterns = [
|
|||||||
views.RapidExamViews.exam_json_edit,
|
views.RapidExamViews.exam_json_edit,
|
||||||
name="exam_json_edit",
|
name="exam_json_edit",
|
||||||
),
|
),
|
||||||
path("exam/<int:pk>/scores", views.exam_scores_cid, name="exam_scores_cid"),
|
path("exam/<int:pk>/scores", cache_page(60 * 1)(views.exam_scores_cid), name="exam_scores_cid"),
|
||||||
path(
|
path(
|
||||||
"exam/<int:pk>/scores/<int:sk>/",
|
"exam/<int:pk>/scores/<int:sk>/",
|
||||||
views.exam_scores_cid_user,
|
views.exam_scores_cid_user,
|
||||||
|
|||||||
+2
-1
@@ -19,4 +19,5 @@ django-dbbackup
|
|||||||
django-hashedfilenamestorage
|
django-hashedfilenamestorage
|
||||||
djangorestframework
|
djangorestframework
|
||||||
django-tinymce
|
django-tinymce
|
||||||
django-zipview
|
django-zipview
|
||||||
|
pymemcache
|
||||||
Reference in New Issue
Block a user