Compare commits

..

2 Commits

Author SHA1 Message Date
Benni Bärmann b740838b13 submit leads to the done() view now 2020-09-29 11:08:16 +02:00
Benni Bärmann 67e894557a <form> <submit> ... added 2020-09-29 10:21:49 +02:00
3 changed files with 10 additions and 3 deletions

View File

@ -1 +1,5 @@
{{formset}}
<form action="saved" method="post">
{% csrf_token %}
{{ formset }}
<input type="submit" value="Submit">
</form>

View File

@ -4,4 +4,5 @@ from . import views
urlpatterns = [
path('', views.index, name='index'),
path('saved', views.done, name='done')
]

View File

@ -1,8 +1,7 @@
from django.shortcuts import render
from django.forms import modelformset_factory
from .models import Project
# Create your views here.
# from django.http import HttpResponse
from django.http import HttpResponse
def index(request):
@ -16,3 +15,6 @@ def index(request):
else:
formset = ProjectFormSet()
return render(request, 'input/project.html', {'formset': formset})
def done(request):
return HttpResponse("Your data is save now.")