On Saturday 26 November 2011,
Lord Goosfancito <[email protected]> wrote:

> Hello.
> 
> I have problem when i declared field with "blank" the admin django show
> this error:
> 
> (1048, "Column 'fechaProyecto' cannot be null")
> 
> in my models.py:
> 
>      fechaProyecto = models.DateField(verbose_name='Ingresó a la
> subdirección de Proyecto')
>      fechaProyecto.blank = True
> 
> What is the problem?

  You must define:

  _fecha_proyecto_label = u'Ingresó a la subdirección de Proyecto'
  fechaProyecto = models.DateField(verbose_name=_fecha_proyecto_label,
                                   blank=True,
                                   null=True)

  Also, camel case is not used in Python and Django standards. Please
read the Style Guide and the Zen of Python to have a better approach
on Python coding:

  Style Guide:
  http://www.python.org/dev/peps/pep-0008/

  Zen of Python:
  http://www.python.org/dev/peps/pep-0020/

> 
> Thank's
> 
> Gustavo.


Best regards,
-- 
Daniel Molina Wegener <dmw [at] coder [dot] cl>
System Programmer & Web Developer
Phone: +56 (2) 979-0277 | Blog: http://coder.cl/

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

Reply via email to