예제 #1
0
파일: views.py 프로젝트: kipishio/demo
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})
예제 #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})
예제 #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})
예제 #4
0
파일: views.py 프로젝트: cherepanov92/demo
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})