Ticket #1819: textfield_null.diff

File textfield_null.diff, 476 bytes (added by mir@…, 18 years ago)

patch

  • django/core/management.py

    a b def inspectdb():  
    835835            # table description.
    836836            if row[6]: # If it's NULL...
    837837                extra_params['blank'] = True
    838                 if not field_type in ('TextField', 'CharField'):
     838                if not field_type in ('TextField(', 'CharField('):
    839839                    extra_params['null'] = True
    840840
    841841            field_desc = '%s = models.%s' % (att_name, field_type)
Back to Top