I start with this:
from django.db import models
class Example(models.Model):
id = models.CharField(null=False, blank=False)
name = models.CharField(null=False, blank=False)
Now if I create a new object with a name and without an id, the id will be replaced with an empty string and the object creation will be successful.
example = Example.objects.create(name="test")
I would like it to return an error instead since I specified null=False and blank=False. Is there a "native" way to do it?
I'm using Django 1.3.6.
nullbut Django decides that when I give itNoneit should be converted to an empty string...