django sync db question

Posted by Hulk on Stack Overflow See other posts from Stack Overflow or by Hulk
Published on 2010-05-25T07:34:17Z Indexed on 2010/05/25 7:51 UTC
Read the original article Hit count: 339

Filed under:
|
|

In django models say this model exist in details/models.py

    class OccDetails(models.Model):
       title = models.CharField(max_length = 255)
       occ = models.ForeignKey(Occ)

So when sync db is made the following fields get created

and later to this of two more fields are added and sync db is made the new fields doesnt get created.How is this to be solved,Also what is auto_now=true in the below

these are the new fields

         created_date = models.DateTimeField(auto_now_add=True)
         modified_date = models.DateTimeField(auto_now_add=True, auto_now=True)

© Stack Overflow or respective owner

Related posts about python

Related posts about django