当我运行 sqlall 时,我可以看到所有表的SQL,但是对于syncdb,数据库中没有创建两个表。 这两个表定义为
class Event(models.Model):
event_id=models.IntegerField(primary_key=True)
OS_CHOICE=(('Win 2003','windows 2003'),
('Win 2008','Windows 2008'),
('Win XP','Windows XP'),
('Win VISTA','Win VISTA'),
('Win 2007','Windows 2007'),
)
windows=models.CharField(max_length=10,choices=OS_CHOICE,default='Win 2003')
def __unicode__(self):
return " %s, event_id :%s" \
% (self.windows, self.event_id)
class Meta:
db_table= 'event'
verbose_name_plural='events'
class Eventgroups(models.Model):
event=models.ManyToManyField(Event)
group_name=models.CharField(max_length=100)
def __unicode__(self):
return "%s, %s" \
% (self.group_name, self.event)
class Meta:
db_table= 'eventgroup'
verbose_name_plural='eventgroups'
任何人都可以给我一个洞察力吗?