Beispiel #1
0
def myname(request):
    if request.method == 'POST':
        form = MyNameForm(request.POST)
        if form.is_valid():
            return HttpResponseRedirect('/forms/')

    else:
        form = MyNameForm()
    return render(request, 'forms/forms.html', {'form': form})
Beispiel #2
0
def my_name(request):
    title = 'Работа с формами'
    if request.method == 'POST':
        form = MyNameForm(request.POST)
        if form.is_valid():
            return HttpResponseRedirect('/forms/tranks/')

    else:
        form = MyNameForm()

    return render(request, 'forms.html', {'title': title, 'form': form})
Beispiel #3
0
def my_name(request):
    title = 'Работа с формами'
    if request.method == 'POST':
        form = MyNameForm(request.POST)
        if form.is_valid():
            return HttpResponseRedirect('/forms/tranks/')

    else:
        form = MyNameForm()

    return render(request, 'forms.html', {'title': title, 'form': form})
Beispiel #4
0
def my_name(request):
    if request.method == 'POST':
        form = MyNameForm(request.POST)

        if form.is_valid():
            return render(request, 'tranks.html', {'form': form})

    else:
        form = MyNameForm()

    return render(request, './forms.html', {'form': form})