Re: Very bad experience in Django...

2009-06-26 Thread iyank7

Joshua Partogi wrote:
> 
> You need to define required=False
> 
> On Thu, Jun 25, 2009 at 10:24 PM, steveneo  > wrote:


if steveneo got `Very Bad experience`, maybe i got `Very..very... n 
very... bad experience`,

but i still learning django ^_^

*There`s no magic, its must be explicitly defined ^_^

iyank4

--~--~-~--~~~---~--~~
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: Very bad experience in Django...

2009-06-26 Thread Lars Stavholm

Chris Withers wrote:
> steveneo wrote:
>> I try to use Django in a new project. Honestly, it is very bad
>> experience. It looks not boosting my development speed. Today, I
>> almost give up and begin to look up another Python framework
> 
> Go for it :-)

+1
/L

--~--~-~--~~~---~--~~
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: Very bad experience in Django...

2009-06-25 Thread Karen Tracey
On Thu, Jun 25, 2009 at 9:46 AM, Chris Withers wrote:

>
> steveneo wrote:
> > BooleanField limits only to CheckBox?  But I set
> > widget=HiddenField It does not report error. HTML renders
> > correctly, but actually, you can not use like that?!
>
> Didn't you hear me: I said go find another framework, Django obviously
> sucks because one new user can't get his head around it ;-)
>

Please don't be rude. Perhaps your emoticon at the end was intended to
convey a light comical tone but tone is extremely hard to convey in email
and telling someone to go away because they've expressed some frustration
strikes me as rude.  Everyone is free to simply not respond to anyone they
feel is expressing unreasonable frustration; I don't see that it helps
matters much to try to tell them they are being unreasonable.

To the original poster, if you read the documentation on
django.forms.BooleanField:

http://docs.djangoproject.com/en/dev/ref/forms/fields/#booleanfield

you'll see it doesn't say anything about the validation behavior being
dependent on the widget in use.  So it doesn't matter what widget you use,
if you want to be able to validate False as a valid value, then you need to
include required=False in the form field definition.

(There was a huge long contentious discussion about required=True implying a
BooleanField value must be True in order for the field to pass validation --
you could find in the ticket tracker if you looked for it.  Not everyone
agrees with the choice made, but it was clearly an issue where not everyone
was going to agree no matter what decision was made.  It's been made and
won't be changed and the way to make your case work is simply pass
required=False on the form field definition.)

Karen

--~--~-~--~~~---~--~~
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: Very bad experience in Django...

2009-06-25 Thread Richard Shebora
Chris,

I don't know you.  But I hope your day gets a little better and your
problems lighter.

Sincerely,
Richard

On 6/25/09, Chris Withers  wrote:
>
>
> steveneo wrote:
> > BooleanField limits only to CheckBox?  But I set
> > widget=HiddenField It does not report error. HTML renders
> > correctly, but actually, you can not use like that?!
>
>
> Didn't you hear me: I said go find another framework, Django obviously
> sucks because one new user can't get his head around it ;-)
>
>
> Chris
>
> --
> Simplistix - Content Management, Zope & Python Consulting
> - http://www.simplistix.co.uk
>
> >
>


-- 

Thanks,
Richard Shebora


Information in this transmission is privileged and confidential.
It is intended for the use of the individual or entity named above.
Any review, dissemination, disclosure, alteration,  printing,
circulation or transmission of this email or it's attachments
is prohibited and unlawful.


--~--~-~--~~~---~--~~
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: Very bad experience in Django...

2009-06-25 Thread Xavier Ordoquy

On Thu, 2009-06-25 at 06:43 -0700, steveneo wrote:
> BooleanField limits only to CheckBox?  But I set
> widget=HiddenField It does not report error. HTML renders
> correctly, but actually, you can not use like that?!

http://docs.djangoproject.com/en/dev/ref/forms/fields/#booleanfield

You should have read that section, esp:

"Validates that the check box is checked (i.e. the value is True) if the
field has required=True."

and the note following:

"Since all Field subclasses have required=True by default, the
validation condition here is important. If you want to include a
checkbox in your form that can be either checked or unchecked, you must
remember to pass in required=False when creating the BooleanField"

By saying you have a very bad experience with Django because you didn't
read the documentation there's not much we can do for you.



--~--~-~--~~~---~--~~
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: Very bad experience in Django...

2009-06-25 Thread Chris Withers

steveneo wrote:
> BooleanField limits only to CheckBox?  But I set
> widget=HiddenField It does not report error. HTML renders
> correctly, but actually, you can not use like that?!

Didn't you hear me: I said go find another framework, Django obviously 
sucks because one new user can't get his head around it ;-)

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk

--~--~-~--~~~---~--~~
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: Very bad experience in Django...

2009-06-25 Thread steveneo

BooleanField limits only to CheckBox?  But I set
widget=HiddenField It does not report error. HTML renders
correctly, but actually, you can not use like that?!




On Jun 25, 11:22 pm, Chris Withers  wrote:
> steveneo wrote:
> > I try to use Django in a new project. Honestly, it is very bad
> > experience. It looks not boosting my development speed. Today, I
> > almost give up and begin to look up another Python framework
>
> Go for it :-)
>
> Chris
>
> --
> Simplistix - Content Management, Zope & Python Consulting
>             -http://www.simplistix.co.uk
--~--~-~--~~~---~--~~
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: Very bad experience in Django...

2009-06-25 Thread Chris Withers

steveneo wrote:
> I try to use Django in a new project. Honestly, it is very bad
> experience. It looks not boosting my development speed. Today, I
> almost give up and begin to look up another Python framework

Go for it :-)

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk

--~--~-~--~~~---~--~~
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: Very bad experience in Django...

2009-06-25 Thread Daniel Roseman

On Jun 25, 1:24 pm, steveneo  wrote:
> I try to use Django in a new project. Honestly, it is very bad
> experience. It looks not boosting my development speed. Today, I
> almost give up and begin to look up another Python framework
>
> One question,  does anyone use a hiddenInput in Form?  Something like:
> class ProfileForm(forms.Form):
>    cpwd = forms.BooleanField(widget=forms.HiddenInput, initial=False)
>
> Whatever I use {{form.as_p}} or customized form. It always reports
> "(Hidden field cpwd) This field is required." I check out the HTML
> source, the hidden field is just there:
> 
>
> I try to use CharField() instead, it looks all right but I don't want
> to do such hack...
>
> I really feel a little crazy to trace the reason It looks a very
> simple usage but so buggy... I am a little suspect whether there are
> more bugs ahead of my development process.

So, coming entirely new to a framework, you have a single problem, and
this makes it a 'very bad experience'? Maybe you should get a sense of
proportion.

In the meantime, the documentation on BooleanField is quite clear:
"Validates that the check box is checked (i.e. the value is True) if
the field has required=True."
And the box underneath explains further:
"Since all Field subclasses have required=True by default, the
validation condition here is important. If you want to include a
checkbox in your form that can be either checked or unchecked, you
must remember to pass in required=False when creating the
BooleanField."

So, since you want the value to be False, you need to pass in
required=False in your declaration.
--
DR.
--~--~-~--~~~---~--~~
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: Very bad experience in Django...

2009-06-25 Thread Joshua Partogi
You need to define required=False

On Thu, Jun 25, 2009 at 10:24 PM, steveneo  wrote:

>
> I try to use Django in a new project. Honestly, it is very bad
> experience. It looks not boosting my development speed. Today, I
> almost give up and begin to look up another Python framework
>
> One question,  does anyone use a hiddenInput in Form?  Something like:
> class ProfileForm(forms.Form):
>   cpwd = forms.BooleanField(widget=forms.HiddenInput, initial=False)
>
>
> Whatever I use {{form.as_p}} or customized form. It always reports
> "(Hidden field cpwd) This field is required." I check out the HTML
> source, the hidden field is just there:
> 
>
> I try to use CharField() instead, it looks all right but I don't want
> to do such hack...
>
> I really feel a little crazy to trace the reason It looks a very
> simple usage but so buggy... I am a little suspect whether there are
> more bugs ahead of my development process.
>



-- 
Join Scrum8.com.

http://scrum8.com/member/jpartogi/
http://scrum8.com/blog/jpartogi/
http://twitter.com/scrum8

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Very bad experience in Django...

2009-06-25 Thread steveneo

I try to use Django in a new project. Honestly, it is very bad
experience. It looks not boosting my development speed. Today, I
almost give up and begin to look up another Python framework

One question,  does anyone use a hiddenInput in Form?  Something like:
class ProfileForm(forms.Form):
   cpwd = forms.BooleanField(widget=forms.HiddenInput, initial=False)


Whatever I use {{form.as_p}} or customized form. It always reports
"(Hidden field cpwd) This field is required." I check out the HTML
source, the hidden field is just there:


I try to use CharField() instead, it looks all right but I don't want
to do such hack...

I really feel a little crazy to trace the reason It looks a very
simple usage but so buggy... I am a little suspect whether there are
more bugs ahead of my development process.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---