I'm not sure about the case with null. However, I believe that most uses of 
CharField leave null=False and use the empty string instead to represent 
"empty" value. 

On April 7, 2021 1:06:44 AM CDT, Mike Dewhirst <mi...@dewhirst.com.au> wrote:
>I have just made a CharField unique and Django detects duplicates
>nicely 
>but seems to ignore multiple instances where the field value is null.
>
>     arn = models.CharField(
>         max_length=MEDIUM,
>         unique=True,
>         null=True,
>         blank=True,
>     )
>
>Is this correct behaviour?
>
>Thanks
>
>Mike
>
>
>
>-- 
>Signed email is an absolute defence against phishing. This email has
>been signed with my private key. If you import my public key you can
>automatically decrypt my signature and be sure it came from me. Just
>ask and I'll send it to you. Your email software can handle signing.
>
>-- 
>You received this message because you are subscribed to the Google
>Groups "Django users" group.
>To unsubscribe from this group and stop receiving emails from it, send
>an email to django-users+unsubscr...@googlegroups.com.
>To view this discussion on the web visit
>https://groups.google.com/d/msgid/django-users/fb02525d-773c-4ce3-43a2-f41397176a36%40dewhirst.com.au.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8774A769-9A6D-4BC7-AD3B-2EEDC6C5DF15%40fattuba.com.

Reply via email to