|
@ -1,9 +1,10 @@ |
|
|
from django.shortcuts import render |
|
|
from django.shortcuts import render |
|
|
from django.forms import modelformset_factory |
|
|
from django.forms import modelformset_factory |
|
|
from .models import Project |
|
|
|
|
|
from .forms import ProjectForm |
|
|
|
|
|
from django.http import HttpResponse |
|
|
from django.http import HttpResponse |
|
|
|
|
|
from formtools.wizard.views import SessionWizardView |
|
|
|
|
|
|
|
|
|
|
|
from .forms import ProjectForm, VolunteerForm, LibraryForm |
|
|
|
|
|
from .models import Project |
|
|
|
|
|
|
|
|
def intern(request): |
|
|
def intern(request): |
|
|
# return HttpResponse("Hello, world. You're at the input form") |
|
|
# return HttpResponse("Hello, world. You're at the input form") |
|
@ -28,3 +29,11 @@ def done(request): |
|
|
|
|
|
|
|
|
def extern(request): |
|
|
def extern(request): |
|
|
return HttpResponse("The world out there is large and dangerous") |
|
|
return HttpResponse("The world out there is large and dangerous") |
|
|
|
|
|
|
|
|
|
|
|
class ExternView(SessionWizardView): |
|
|
|
|
|
template_name = "path/to/template" |
|
|
|
|
|
form_list = [VolunteerForm, LibraryForm] |
|
|
|
|
|
def done(self, form_list, **kwargs): |
|
|
|
|
|
return render(self.request, 'done.html', { |
|
|
|
|
|
'form_data': [form.cleaned_data for form in form_list], |
|
|
|
|
|
}) |