]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/views/meta.py
Fix in badges page.
[osqa.git] / forum / views / meta.py
index 885b8b614740114bf164fa05342499f4e59039de..fc050c218e013cd7882bd97ffeca4d802a4cdf29 100644 (file)
@@ -1,9 +1,9 @@
 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.conf import settings
+from forum import settings
 from forum.forms import FeedbackForm
 from django.core.urlresolvers import reverse
 from django.utils.translation import ugettext as _
@@ -13,20 +13,17 @@ 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 faq(request):
-    md = markdown.Markdown([SettingsExtension({})])
-    text = md.convert(settings.FAQ_PAGE_TEXT.value)
+def static(request, title, content):
+    return render_to_response('static.html', {'content' : content, 'title': title}, context_instance=RequestContext(request))
 
-    return render_to_response('faq.html', {'text' : text}, 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":
@@ -38,6 +35,7 @@ def feedback(request):
                 context['email'] = form.cleaned_data.get('email',None)
             context['message'] = form.cleaned_data['message']
             context['name'] = form.cleaned_data.get('name',None)
+            context['ip'] = request.META['REMOTE_ADDR']
 
             recipients = [(adm.username, adm.email) for adm in User.objects.filter(is_superuser=True)]
 
@@ -72,7 +70,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):