Advertisement
Guest User

views

a guest
Apr 17th, 2014
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. from django.contrib import messages
  2. from django.contrib.auth.models import User
  3. from django.shortcuts import render_to_response, RequestContext, Http404, HttpResponseRedirect
  4.  
  5. from .models import Question, Answer, UserAnswer
  6.  
  7. def all_questions(request):
  8.     questions = Question.objects.all()
  9.  
  10.     if request.method == 'POST':
  11.         print request.POST['question_id']
  12.         print request.POST['answer']
  13.     return render_to_response('questions/all.html', locals(), context_instance=RequestContext(request))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement