thanks very much everyone, but I just have one more small question. I tried to use some python manage.py command to delete tables (ex: sqlflush, sqlreset), but they all just print out the sql statement without doing the real job, so what is the command to do the actual removal of the tables?
Thanks On Mon, Feb 14, 2011 at 11:16 PM, Praveen Krishna R < rpraveenkris...@gmail.com> wrote: > *Please try delete and recreate the database and do the syncdb again, * > *if you are learning. **If you are in production, use South for django, > for the schema migration.* > > On Tue, Feb 15, 2011 at 10:06 AM, Chen Xu <xuche...@gmail.com> wrote: > >> Hi, everyone: >> I have a question about Django models, >> so I created a Model: >> >> class Person(models.Model): >> name = models.CharField(max_length=60) >> >> and ran the follwing: >> >> python manage.py syncdb >> >> this successfully did what I want, but later on, I added a new field >> into a model >> >> class Person(models.Model): >> GENDER_CHOICES = ( >> (u'M', u'Male'), >> (u'F', u'Female'), >> ) >> name = models.CharField(max_length=60) >> gender = models.CharField(max_length=2, choices=GENDER_CHOICES) >> >> and I tried to run: >> python manage.py syncdb again to sync my database, but it does not do it: >> >> So I am wondering if it is because since Person model already exists, it >> will just simply ignore checking if the field changes. >> And what I should do to sync the database? >> >> >> Thanks >> >> >> >> >> -- >> ⚡ Chen Xu ⚡ >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-users@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > > > > -- > Thanks and Regards, > *Praveen Krishna R* > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- ⚡ Chen Xu ⚡ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.