X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/8fd067230582e411db23ff11f0da68592a1e9b0a..5d33b325a606240f9bcc7d704de1af0152c9bd19:/forum/views/meta.py diff --git a/forum/views/meta.py b/forum/views/meta.py index b11c538..be41bd2 100644 --- a/forum/views/meta.py +++ b/forum/views/meta.py @@ -12,6 +12,8 @@ from forum.models import Badge, Award, User from forum.badges import ALL_BADGES from forum import settings from forum.utils.mail import send_email +from forum.settings.settingsmarkdown import * + import re def favicon(request): @@ -21,12 +23,10 @@ def about(request): return render_to_response('about.html', {'text': settings.ABOUT_PAGE_TEXT.value }, context_instance=RequestContext(request)) def faq(request): - data = { - 'gravatar_faq_url': reverse('faq') + '#gravatar', - 'ask_question_url': reverse('ask'), - 'settings': settings, - } - return render_to_response('faq.html', data, context_instance=RequestContext(request)) + md = markdown.Markdown([SettingsExtension({})]) + text = md.convert(settings.FAQ_PAGE_TEXT.value) + + return render_to_response('faq.html', {'text' : text}, context_instance=RequestContext(request)) def feedback(request): if request.method == "POST": @@ -36,6 +36,7 @@ def feedback(request): if not request.user.is_authenticated: context['email'] = form.cleaned_data.get('email',None) + context['message'] = form.cleaned_data['message'] context['name'] = form.cleaned_data.get('name',None)