from django.conf import settings
from django.views.generic.simple import direct_to_template
from django.http import HttpResponseRedirect, Http404
+from django.shortcuts import get_object_or_404
from cloudcms.models import Application, Service
from cloudcmsfaq.models import Question, Category, CategoryTranslation
"""
Display detailed question.
"""
- entry = Question.objects.get(slug=slug)
+ entry = get_object_or_404(Question, slug=slug)
services = Service.objects.all()
-
+
return direct_to_template(request,
"cloudcmsfaq/detail.html", {'question': entry,
'services': services })