[ date and null value ]

2011-11-26 Thread Lord Goosfancito

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?

Thank's

Gustavo.

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



What read database and load values to diccionary?

2011-11-26 Thread Lord Goosfancito

Hello.

I need load a table to fill one dictionary, next use it in my model.

Example:

def Articles(models.Model):

rules = Here i need load table to fill rules filed...
   example: (
('1', 'one'),
('2', 'delete it'),
('3'.)
)

descripcion = models.CharField(max_length=100, verbose_name = 
'Description of article')

opcions = rules < here i need



Thank's.

--
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: [ date and null value ]

2011-11-27 Thread Lord Goosfancito

El 27/11/11 02:00, Anoop Thomas Mathew escribió:

Hi,
Try this
*fechaProyecto = models.DateField(verbose_name=**'Ingresó a la 
subdirección de Proyecto', blank=True, null=True)*

Thanks,
Anoop
atm
___
Life is short, Live it hard.




On 27 November 2011 05:22, Lord Goosfancito <mailto:goosfanc...@gmail.com>> 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?

Thank's

Gustavo.

-- 
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
<mailto:django-users@googlegroups.com>.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com
<mailto:django-users%2bunsubscr...@googlegroups.com>.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.


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

good! thanks' 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.