X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/19af2f15e6eb1d0ebae23433a8d2555186d96835..0cf194935edb17d2c9288e4c4e5344a1775bcb5d:/forum/views/meta.py diff --git a/forum/views/meta.py b/forum/views/meta.py index ac97938..bae96f2 100644 --- a/forum/views/meta.py +++ b/forum/views/meta.py @@ -1,8 +1,10 @@ +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 +from django.template import RequestContext, loader from django.http import HttpResponseRedirect, HttpResponse +from django.views.static import serve from forum import settings from forum.forms import FeedbackForm from django.core.urlresolvers import reverse @@ -13,20 +15,28 @@ from forum.models import Badge, Award, User from forum.badges.base import BadgesMeta from forum import settings from forum.utils.mail import send_email -from forum.settings.settingsmarkdown import SettingsExtension, markdown import re def favicon(request): return HttpResponseRedirect(str(settings.APP_FAVICON)) -def about(request): - return render_to_response('about.html', {'text': settings.ABOUT_PAGE_TEXT.value }, context_instance=RequestContext(request)) +def static(request, title, content): + return render_to_response('static.html', {'content' : content, 'title': title}, context_instance=RequestContext(request)) -def faq(request): - md = markdown.Markdown([SettingsExtension({})]) - text = md.convert(settings.FAQ_PAGE_TEXT.value) +def media(request, skin, path): + return serve(request, "%s/media/%s" % (skin, path), + document_root=os.path.join(os.path.dirname(os.path.dirname(__file__)),'skins').replace('\\','/')) - return render_to_response('faq.html', {'text' : text}, context_instance=RequestContext(request)) +def markdown_help(request): + # md = markdown.Markdown([SettingsExtension({})]) + # text = md.convert(settings.FAQ_PAGE_TEXT.value) + + return render_to_response('markdown_help.html', context_instance=RequestContext(request)) + + +def opensearch(request): + return render_to_response('opensearch.html', {'settings' : settings}, context_instance=RequestContext(request)) + def feedback(request): if request.method == "POST": @@ -73,7 +83,6 @@ def badges(request): return render_to_response('badges.html', { 'badges' : badges, 'mybadges' : my_badges, - 'feedback_faq_url' : reverse('feedback'), }, context_instance=RequestContext(request)) def badge(request, id, slug):