You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
490 B
22 lines
490 B
from django.shortcuts import render, redirect
|
|
|
|
# Create your views here.
|
|
from django.urls import reverse
|
|
|
|
from kolotoc.forms import Formular
|
|
|
|
|
|
def formular(request):
|
|
if request.method == "POST":
|
|
form = Formular(request.POST,request.FILES)
|
|
if form.is_valid():
|
|
form.save()
|
|
|
|
return redirect(reverse('index'))
|
|
else:
|
|
form = Formular()
|
|
|
|
context = {
|
|
"form": form,
|
|
}
|
|
return render(request,"kolotoc/formular.html",context)
|
|
|