Thank you all for quick responses. I feel a bit silly trying to put
unique=true for a boolean.
What I was trying to accomplish though: Only one value can have the
boolean set to "true".
Also (here I am taking the whole hand when you guys have offered a
finger) ... have any of you implemented som
The statements seem fine, just that your models don't reflect what you
are after.
1. if you set null=True, the database lines would read "NULL" instead
of "NOT NULL". blank=True refers to whether the value can be empty
(i.e. NULL is not equal to ''). However for most CharFields you will
want to k
> 1. All fields have 'NOT NULL' and are required - this does not reflect
> my model
If you want a field to be nullable, use null=True - the default is
False. [1]
If you want a field to not be required in the admin application, use
blank=True - the default is False. [2]
> 2. I get strange erro
sry it's null=True
--~--~-~--~~~---~--~~
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 [EMAIL PROTEC
You need to use null=False to allow null values.
--~--~-~--~~~---~--~~
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 gro
1. All fields have 'NOT NULL' and are required - this does not reflect
my model
2. I get strange errors in the admin when adding a second item of
anything : IntegrityError at /admin/portfolio/work/add/ (1062,
"Duplicate entry '0' for key 2")
portfolio/models.py
---
from
6 matches
Mail list logo