Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » Does a new field in existing populated database need both: null=True, blank=True? [RSS Feed]

#1 June 13, 2010 10:14:09

Dave E.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Does a new field in existing populated database need both: null=True, blank=True?


I have a Django blog app with data in the (SQLite) database and have
installed South so that I can add a 'modified' date field to the
'Entry' model. The field will initially be blank so I need blank=True
for Django's admin validation.

However, since it will also be empty in the database, do I need
null=True as well (since it is a date field and not a string-based
field)?

If it were a string-based field, would I need to populate it with an
empty string instead of null?

I've read James Bennet's post and the Django docs (links below), but
can't fathom the correct approach for this case:http://www.b-list.org/weblog/2006/jun/28/django-tips-difference-between-blank-and-null/http://docs.djangoproject.com/en/dev/ref/models/fields/--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » Does a new field in existing populated database need both: null=True, blank=True? [RSS Feed]

Board footer

Moderator control

Enjoy the 18th of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support