vcp-elearning/tkupek_elearning/elearning/views.py
2016-01-31 18:19:45 +01:00

14 lines
No EOL
393 B
Python

from django.shortcuts import render_to_response
from tkupek_elearning.elearning.models import Setting, Question
#import pdb; pdb.set_trace()
def home(request):
questions = Question.objects.all()
settings = Setting.objects.filter(active=1)
if(settings) :
settings = settings[0]
return render_to_response('index.html', {'settings': settings, 'questions': questions})