Re: Form Validation - Redisplay With Error
Thanks, Derek! Wikipedia makes good sense. On May 27, 1:14 am, Derek wrote: > On May 26, 1:07 am, Robin wrote:> I'm very > comfortable with SQL and more traditional programming. Would > > you recommend some specific HTTP primer, or anything else for those > > making the transition to web dev? > > Assuming good faith in the wisdom of the crowd... > :http://en.wikipedia.org/wiki/Http > An older intro (ignore > CGI!):http://www.orion.it/~alf/whitepapers/HTTPPrimer.html > Formal specs:http://www.w3.org/standards/techs/http#w3c_all -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Form Validation - Redisplay With Error
On May 26, 1:07 am, Robin wrote: > I'm very comfortable with SQL and more traditional programming. Would > you recommend some specific HTTP primer, or anything else for those > making the transition to web dev? > Assuming good faith in the wisdom of the crowd... : http://en.wikipedia.org/wiki/Http An older intro (ignore CGI!): http://www.orion.it/~alf/whitepapers/HTTPPrimer.html Formal specs: http://www.w3.org/standards/techs/http#w3c_all -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Form Validation - Redisplay With Error
I'm very comfortable with SQL and more traditional programming. Would you recommend some specific HTTP primer, or anything else for those making the transition to web dev? On May 25, 8:24 am, bruno desthuilliers wrote: > On May 25, 3:54 pm, Robin wrote: > > > Because that would be too easy? ;) > > Well... > > > Sincere thanks, Bruno. A lot of > > this is new to me...python, Django, web dev, and even open source. > > Didn't even think of that! > > Surprisingly enough, it took me a couple weeks realizing I could as > well just read the source code when I started working on / with oss. > > wrt/ web dev, I think the most important thing to learn is the HTTP > protocol itself (and a couple others related specs like cookies etc). > Once you get it, lot of things in Django (or any other decent web > framework) starts to make sense, and it's easier to know what to look > for in the doc. > > (ok, I assume you already have a decent knowledge of things like SQL, > HTML, text processing, Python etc). -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Form Validation - Redisplay With Error
On May 25, 3:54 pm, Robin wrote: > Because that would be too easy? ;) Well... > Sincere thanks, Bruno. A lot of > this is new to me...python, Django, web dev, and even open source. > Didn't even think of that! Surprisingly enough, it took me a couple weeks realizing I could as well just read the source code when I started working on / with oss. wrt/ web dev, I think the most important thing to learn is the HTTP protocol itself (and a couple others related specs like cookies etc). Once you get it, lot of things in Django (or any other decent web framework) starts to make sense, and it's easier to know what to look for in the doc. (ok, I assume you already have a decent knowledge of things like SQL, HTML, text processing, Python etc). -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Form Validation - Redisplay With Error
sorry, i'll repost under the appropriate subject. On 25 May 2011 17:11, Ndungi Kyalo wrote: > Am trying to pre-select a radio button created with the django.forms library > : > vote = forms.ChoiceField( > widget = forms.RadioSelect(), > choices = [ > ['a', 'i liked it'], > ['b', 'i did not like it'] > ], > required=True > ) > How would I go about getting the 'a' choice pre-selected on an unbound form > ? > -- > Ndungi Kyalo -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Form Validation - Redisplay With Error
Am trying to pre-select a radio button created with the django.forms library : vote = forms.ChoiceField( widget = forms.RadioSelect(), choices = [ ['a', 'i liked it'], ['b', 'i did not like it'] ], required=True ) How would I go about getting the 'a' choice pre-selected on an unbound form ? -- Ndungi Kyalo -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Form Validation - Redisplay With Error
Because that would be too easy? ;) Sincere thanks, Bruno. A lot of this is new to me...python, Django, web dev, and even open source. Didn't even think of that! There's so much to learn, it can be overwhelming. Thank you again, I'll have a look through the code today. On May 25, 1:02 am, bruno desthuilliers wrote: > On May 25, 4:48 am, Robin wrote: > > > I've tried to track down this information (new to Django and web dev) > > and I'm certainly not expecting a spoon-fed answer. A nudge in the > > right direction would be most appreciated. :) > > Why don't you just have a look at the code of the builtin auth > form ?-) > > https://code.djangoproject.com/browser/django/trunk/django/contrib/au... -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Form Validation - Redisplay With Error
On May 25, 4:48 am, Robin wrote: > I've tried to track down this information (new to Django and web dev) > and I'm certainly not expecting a spoon-fed answer. A nudge in the > right direction would be most appreciated. :) Why don't you just have a look at the code of the builtin auth form ?-) https://code.djangoproject.com/browser/django/trunk/django/contrib/auth/forms.py#L80 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Form Validation - Redisplay With Error
Apologies...it seems I misunderstood clean_message(). It's not a method, but clean_* is something for each field. I'll continue my research, but would still love to hear from you all about custom login forms and how you handle them. On May 24, 8:48 pm, Robin wrote: > I'm writing a basic login form using the Django built in > authentication system, but my own login form. This may be a mistake, > but it can't hurt to learn how to get it to work? :) > > I have this Django Form: > > class SignInForm(forms.Form): > username = forms.CharField(label='User Name', max_length=30) > password = forms.CharField(label='Password', max_length=30, > widget=forms.PasswordInput(render_value=False)) > > One of the things I'm not sure how to handle is the idea of > redisplaying the form with an error if the login doesn't succeed. The > fields will validate alright, but the authentication may fail. Rather > than redirect to a failure page when I call authenticate(), I would > like to return the user to the sign in page and display an error > message. Is this something I should treat as a custom validation > issue for this form? If so, I've seen mention of a clean_message > function on djangobook.com for 1.0, but it's not in the documentation > for 1.3...is this an old idea I should avoid? > > I've tried to track down this information (new to Django and web dev) > and I'm certainly not expecting a spoon-fed answer. A nudge in the > right direction would be most appreciated. :) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.