当我更改Django模型时,如何在管理中添加历史记录?,当我保存到其他模板或shell中时
我在管理中使用Django1.6。更改被存储,但在另一个模板中我看不到这些更改。我怎样才能解决这个问题?在
class Modelo(models.Model):
nombre = models.CharField(max_length=100)
marca = models.ForeignKey(Marca)
def __unicode__(self):
return self.nombre
class Meta:
unique_together = ("nombre", "marca")
verbose_name_plural = u'Modelos'
verbose_name=u'Modelos'
您可以使用django-simple-history应用程序
一些简单用法(在配置应用程序后,从文档中):
相关问题 更多 >
编程相关推荐