On Mon, Jul 7, 2008 at 1:49 PM, Fernando Rodríguez <[EMAIL PROTECTED]>
wrote:
>
> Hi,
>
> I want one on my models to have an optional field. After checking the
> code in the Field class, there are two promising params to __init__():
> blank=False, null=False
>
> What's the difference between both
blank will store a string as a string with nothing in it
null will store a string as null
you should use blank
http://www.djangoproject.com/documentation/model-api/#null
says you shouldnt use null unless you have a specific reason to
On Jul 7, 1:49 pm, Fernando Rodríguez <[EMAIL PROTECTED]> wro
Hi,
I want one on my models to have an optional field. After checking the
code in the Field class, there are two promising params to __init__():
blank=False, null=False
What's the difference between both and which one should I use?
Thanks! :-)
--~--~-~--~~~---~--~
3 matches
Mail list logo