Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

from django.http import HttpResponse, HttpResponseRedirect, HttpResponseBadRequest, HttpResponseServerError, HttpResponseForbidden 

from django.template import RequestContext 

from django.shortcuts import get_object_or_404, render_to_response 

 

from madrona.simplefaq.models import * 

 

 

def faq(request): 

    faq_groups = FaqGroup.objects.all() 

    faqs_by_group = [] 

    #Build an faq list by group, then by faq.  order them by importance 

    for group in faq_groups: 

        faq_query = Faq.objects.filter(faq_group__faq_group_name=group.faq_group_name).order_by('importance') 

        faqs_by_group.append({'group_obj':group,'group_faqs':faq_query}) 

    return render_to_response('faq.html', {'faqs_by_group':faqs_by_group}, context_instance=RequestContext(request))