|
|
От: |
Aikin
|
kavaleu.ru |
| Дата: | 27.11.12 08:12 | ||
| Оценка: | |||
Чтобы все это заработало в модели нужно хранить много метаданных.South has a few key features:
Automatic migration creation: South can see what’s changed in your models.py file and automatically write migrations that match your changes.
Database independence: As far as possible, South is completely database-agnostic, supporting five different database backends.
App-savvy: South knows and works with the concept of Django apps, allowing you to use migrations for some of your apps and leave the rest to carry on using syncdb.
VCS-proof: South will notice if someone else commits migrations to the same app as you and they conflict.
class Knight(models.Model):
name = models.CharField(max_length=100)
of_the_round_table = models.BooleanField()
dances_whenever_able = models.BooleanField()
shrubberies = models.IntegerField(null=False)class Knight(models.Model):
fullname = models.CharField(max_length=100)
of_the_round_table = models.BooleanField()
dances_whenever_able = models.BooleanField()
shrubberies = models.IntegerField(null=False)