Files
@ 2b1fd9ab90d9
Branch filter:
Location: website/www/conservancy/apps/assignment/views.py - annotation
2b1fd9ab90d9
799 B
text/x-python
Add assignment date range.
2b1fd9ab90d9 a2675ee029a5 780e0b8dbfe3 780e0b8dbfe3 2b1fd9ab90d9 a2675ee029a5 a2675ee029a5 a2675ee029a5 2b1fd9ab90d9 a2675ee029a5 2b1fd9ab90d9 2b1fd9ab90d9 2b1fd9ab90d9 2b1fd9ab90d9 2b1fd9ab90d9 2b1fd9ab90d9 2b1fd9ab90d9 2b1fd9ab90d9 a2675ee029a5 a2675ee029a5 a2675ee029a5 a2675ee029a5 a2675ee029a5 a2675ee029a5 a2675ee029a5 a2675ee029a5 780e0b8dbfe3 780e0b8dbfe3 780e0b8dbfe3 780e0b8dbfe3 780e0b8dbfe3 | from django import forms
from django.urls import reverse_lazy
from django.views.generic import TemplateView
from django.views.generic.edit import CreateView
from .models import Assignment
class AssignmentForm(forms.ModelForm):
model = Assignment
coverage_from = forms.DateField(required=False)
coverage_to = forms.DateField(required=False)
class AssignmentCreateView(CreateView):
"""Show a form for the initial copyright assignment."""
form_class = AssignmentForm
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'
|