This repository has been archived on 2021-06-29. You can view files and clone it, but cannot push or open issues or pull requests.
2015-04-13 13:33:40 +00:00
|
|
|
# coding: utf-8
|
2015-04-09 15:35:38 +00:00
|
|
|
|
2015-04-13 13:33:40 +00:00
|
|
|
# django
|
|
|
|
from django.views.generic import View
|
|
|
|
from django.template import RequestContext
|
|
|
|
from django.shortcuts import render_to_response
|
|
|
|
from django.db.models import Count
|
|
|
|
from django.contrib.auth import get_user_model
|
|
|
|
|
|
|
|
# shelfzilla.faq
|
|
|
|
from .models import QuestionAnswerCategory
|
|
|
|
|
|
|
|
|
|
|
|
class FaqListView(View):
|
|
|
|
template = 'faq/list.html'
|
|
|
|
|
|
|
|
def get(self, request):
|
|
|
|
data = {
|
|
|
|
'categories': QuestionAnswerCategory.objects.all(),
|
|
|
|
'navigation': {
|
|
|
|
'section': 'faqs',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = RequestContext(request, data)
|
|
|
|
return render_to_response(self.template, context_instance=ctx)
|