1 from django.http import HttpResponse, HttpResponseRedirect, HttpResponseBadRequest, HttpResponseServerError, HttpResponseForbidden
2 from django.template import RequestContext
3 from django.shortcuts import get_object_or_404, render_to_response
4
5 from madrona.simplefaq.models import *
6
7
9 faq_groups = FaqGroup.objects.all()
10 faqs_by_group = []
11
12 for group in faq_groups:
13 faq_query = Faq.objects.filter(faq_group__faq_group_name=group.faq_group_name).order_by('importance')
14 faqs_by_group.append({'group_obj':group,'group_faqs':faq_query})
15 return render_to_response('faq.html', {'faqs_by_group':faqs_by_group}, context_instance=RequestContext(request))
16