Okay. Thank you so very much! Just one last question, just to know that i
got it right. So, variables and return are not part of the else clause, and
that they return the errors of the last form post. Did i got it right?
On Fri, Jul 12, 2013 at 8:41 PM, Daniel Roseman wrote:
> On Friday, 12 July
On Friday, 12 July 2013 14:27:31 UTC+1, Kakar wrote:
> Okay! That did solved the problem. Thank you! Here's my new view.py:
>
> def register_page(request):
> if request.method == 'POST':
> form = RegistrationForm(request.POST)
> if form.is_valid():
> user = User.obj
Okay! That did solved the problem. Thank you! Here's my new view.py:
def register_page(request):
if request.method == 'POST':
form = RegistrationForm(request.POST)
if form.is_valid():
user = User.objects.create_user(
username=form.cleaned_data['usern
On Thursday, 11 July 2013 23:08:25 UTC+1, Kakar wrote:
> Hi,
> I am learning Django from an old Django version book, and i am stuck with
> a problem regarding forms. When i render forms, i get the registration
> right, but if its incorrect, it does not show the error msg in the html. I
> tried
Its just displaying form again, but without any errors. Please guide me to
where am missing something.
On Fri, Jul 12, 2013 at 4:34 AM, Kakar Arunachal Service <
kakararunachalserv...@gmail.com> wrote:
> I am sorry, but its still not displaying any errors after it renders.
>
>
> On Fri, Jul 12,
I am sorry, but its still not displaying any errors after it renders.
On Fri, Jul 12, 2013 at 3:47 AM, carlos wrote:
> try this with django 1.5.1
> from django.shortcuts import render
>
> def register_page(request):
> if request.method == 'POST':
> form = RegistrationForm(request.PO
try this with django 1.5.1
from django.shortcuts import render
def register_page(request):
if request.method == 'POST':
form = RegistrationForm(request.POST)
if form.is_valid():
form.save()
return HttpResponseRedirect('/register/success/')
else:
Read the above reply.
When you print form.error --> prints out a custom __unicode__ for you to
use in your templates.
However, you can iterate over form.errors and it will act as a normal dict.
On Wednesday, August 1, 2012 1:56:28 AM UTC-4, vivek soundrapandi wrote:
>
> I too have the same pro
I too have the same problem. How did you fix it?
On Wednesday, April 6, 2011 2:13:48 AM UTC+5:30, Roy Smith wrote:
>
> I'm using django-1.3 . I have a view with the following code:
>
> def item_create(request):
> if request.method == 'POST':
> form = ItemForm(request.POST)
>
On Tuesday, April 5, 2011 9:43:48 PM UTC+1, Roy Smith wrote:
>
> I'm using django-1.3 . I have a view with the following code:
>
> def item_create(request):
> if request.method == 'POST':
> form = ItemForm(request.POST)
> if form.is_valid():
> url = form.clea
10 matches
Mail list logo