Hello i have made this it works, but i'm sure that there is a short
way to obtain the same result can you tell me how?
def richiedi(request):
if request.method == 'POST':
form = RichiestaForm(request.POST)
if form.is_valid():
tipo = form.cleaned_data['tipo']
nome_rich = form.cleaned_data['nome_rich']
luca = Richiesta(tipo=tipo,nome_rich=nome_rich)
luca.save()
grazie = 'test'
return render_to_response('grazie.html',
{'grazie':grazie})
else :
form = RichiestaForm()
return render_to_response('richiedi.html',{'form': form})
Thanks
Luca
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---