X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/22236fb67da2f27ceb35ad138f4d534a4fd08251..884e479eef090cc3e9e5ce102bcb839a14993efe:/forum/views/meta.py diff --git a/forum/views/meta.py b/forum/views/meta.py index 436676d..f4f1a80 100644 --- a/forum/views/meta.py +++ b/forum/views/meta.py @@ -1,27 +1,27 @@ import os from itertools import groupby -from django.shortcuts import render_to_response, get_object_or_404 -from django.core.urlresolvers import reverse -from django.template import RequestContext, loader -from django.http import HttpResponseRedirect, HttpResponse, Http404 + +from django.shortcuts import render_to_response +from django.template import RequestContext +from django.http import HttpResponseRedirect, HttpResponse from django.views.static import serve +from django.views.decorators.cache import cache_page +from django.utils.translation import ugettext as _ +from django.utils.safestring import mark_safe + from forum import settings -from forum.modules import decorate from forum.views.decorators import login_required from forum.forms import FeedbackForm -from django.core.urlresolvers import reverse -from django.utils.translation import ugettext as _ -from django.db.models import Count +from forum.modules import decorate from forum.forms import get_next_url from forum.models import Badge, Award, User, Page from forum.badges.base import BadgesMeta from forum.http_responses import HttpResponseNotFound, HttpResponseIntServerError -from forum import settings from forum.utils.mail import send_template_email -from django.utils.safestring import mark_safe from forum.templatetags.extra_filters import or_preview + import decorators -import re, sys, logging, traceback +import logging, traceback def favicon(request): return HttpResponseRedirect(str(settings.APP_FAVICON)) @@ -47,7 +47,7 @@ def media(request, skin, path): def markdown_help(request): return render_to_response('markdown_help.html', context_instance=RequestContext(request)) - +@cache_page(60 * 60 * 24 * 30) #30 days def opensearch(request): return render_to_response('opensearch.html', {'settings' : settings}, context_instance=RequestContext(request))