toastdriven/django-tastypie — Issue #377: Field 'blank' in ModelResource-schema is always false if 'null' is set true
Author: chn
Created: 2012-02-17 12:32:38+00:00
State: open

There seems to be a bug during the creation of a ModelResource schema from a django model.
Setting null=True for a Fileld in the django model will cause 'blank' to always be false in the schema.

Example:

class MyModel(models.Model):

# blank is True in the schema
test_field1 = models.FloatField(blank = True )

# blank is True in the schema
test_field2 = models.FloatField(blank = True , null=False)

# Error here:
# blank is False in the schema
test_field3 = models.FloatField(blank = True , null=True)