from django.shortcuts import render
from django.template.loader import render_to_string

from django.views.generic.edit import UpdateView,DeleteView,CreateView
from django.views.generic import ListView,DetailView

from django.http import (
    HttpResponse, HttpResponseRedirect,
    JsonResponse,
    HttpResponseForbidden, HttpResponseNotAllowed,
    HttpResponseNotFound,Http404
    )
from django.contrib.auth import authenticate, login, logout

from survey.models import Response

class ResponseList(ListView):
    model = Response
    template_name = 'response_list.view'

class ResponseCreate(CreateView):
    login_required = True
    model = Response
    template_name = 'response_create.html'

class ResponseUpdate(UpdateView):
    login_required = True
    model = Response
    template_name = 'response_update.html'

class ResponseDetail(DetailView):
    login_required = True
    model = Response
    template_name = 'response.html'
