23 lines
950 B
Python
23 lines
950 B
Python
from django.shortcuts import render, redirect
|
|
from django.template import loader
|
|
from django.contrib.auth.decorators import login_required
|
|
from questionnaire.models import Questionnaire
|
|
|
|
|
|
@login_required
|
|
def questionnaire(request):
|
|
if request.POST:
|
|
overall = request.GET.get("overall")
|
|
functionality = request.GET.get("functionality")
|
|
look = request.GET.get("look")
|
|
intuitive = request.GET.get("intuitive")
|
|
bugs = request.GET.get("bugs")
|
|
tech = request.GET.get("tech")
|
|
potential = request.GET.get("potential")
|
|
worst = request.GET.get("worst")
|
|
desc = request.GET.get("desc")
|
|
Questionnaire.objects.create(overall=overall, functionality=functionality, look=look, intuitive=intuitive,
|
|
bugs=bugs, tech=tech, potential=potential, worst=worst, desc=desc)
|
|
return redirect('home')
|
|
return render(request, 'questionnaire.html')
|