mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-23 03:43:12 +00:00
Add cache for about view
This commit is contained in:
parent
001728ca70
commit
ce8fa57747
1 changed files with 5 additions and 0 deletions
|
@ -35,13 +35,17 @@ from reversion.models import Version
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.utils.translation import ugettext as _
|
from django.utils.translation import ugettext as _
|
||||||
|
from django.views.decorators.cache import cache_page
|
||||||
|
|
||||||
import git
|
import git
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
from itertools import chain
|
from itertools import chain
|
||||||
|
|
||||||
from preferences.models import Service
|
from preferences.models import Service
|
||||||
from preferences.models import OptionalUser, GeneralOption, AssoOption
|
from preferences.models import OptionalUser, GeneralOption, AssoOption
|
||||||
import users, preferences, cotisations, topologie, machines
|
import users, preferences, cotisations, topologie, machines
|
||||||
|
|
||||||
from .utils import re2o_paginator
|
from .utils import re2o_paginator
|
||||||
from .settings import BASE_DIR, INSTALLED_APPS, MIDDLEWARE_CLASSES
|
from .settings import BASE_DIR, INSTALLED_APPS, MIDDLEWARE_CLASSES
|
||||||
from .contributors import CONTRIBUTORS
|
from .contributors import CONTRIBUTORS
|
||||||
|
@ -163,6 +167,7 @@ def history(request, application, object_name, object_id):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@cache_page(7 * 24 * 60 * 60)
|
||||||
def about_page(request):
|
def about_page(request):
|
||||||
option = AssoOption.objects.get()
|
option = AssoOption.objects.get()
|
||||||
git_info_contributors = CONTRIBUTORS
|
git_info_contributors = CONTRIBUTORS
|
||||||
|
|
Loading…
Reference in a new issue