23 lines
573 B
Python
23 lines
573 B
Python
from django.shortcuts import render
|
|
|
|
from django.urls import reverse_lazy
|
|
from django.views.generic import TemplateView
|
|
from django.views.generic.edit import CreateView
|
|
from .models import Assignment
|
|
|
|
|
|
class AssignmentCreateView(CreateView):
|
|
model = Assignment
|
|
fields = [
|
|
'full_name',
|
|
'email',
|
|
'place_of_residence',
|
|
'repository',
|
|
'coverage',
|
|
'attestation_of_copyright',
|
|
]
|
|
success_url = reverse_lazy('assignment-thanks')
|
|
|
|
|
|
class AssignmentThanksView(TemplateView):
|
|
template_name = 'assignment/thanks.html'
|