本文整理汇总了Python中simple_history.models.HistoricalRecords.module方法的典型用法代码示例。如果您正苦于以下问题:Python HistoricalRecords.module方法的具体用法?Python HistoricalRecords.module怎么用?Python HistoricalRecords.module使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类simple_history.models.HistoricalRecords
的用法示例。
在下文中一共展示了HistoricalRecords.module方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_create_history_model_with_one_to_one_field_to_char_field
# 需要导入模块: from simple_history.models import HistoricalRecords [as 别名]
# 或者: from simple_history.models.HistoricalRecords import module [as 别名]
def test_create_history_model_with_one_to_one_field_to_char_field(self):
records = HistoricalRecords()
records.module = Bookcase.__module__
try:
records.create_history_model(Bookcase)
except:
self.fail("SimpleHistory should handle foreign keys to one to one"
"fields to char fields without throwing an exception.")
示例2: test_create_history_model_with_one_to_one_field_to_integer_field
# 需要导入模块: from simple_history.models import HistoricalRecords [as 别名]
# 或者: from simple_history.models.HistoricalRecords import module [as 别名]
def test_create_history_model_with_one_to_one_field_to_integer_field(self):
records = HistoricalRecords()
records.module = AdminProfile.__module__
try:
records.create_history_model(AdminProfile)
except:
self.fail("SimpleHistory should handle foreign keys to one to one"
"fields to integer fields without throwing an exception")
示例3: test_create_history_model_with_multiple_one_to_ones
# 需要导入模块: from simple_history.models import HistoricalRecords [as 别名]
# 或者: from simple_history.models.HistoricalRecords import module [as 别名]
def test_create_history_model_with_multiple_one_to_ones(self):
records = HistoricalRecords()
records.module = MultiOneToOne.__module__
try:
records.create_history_model(MultiOneToOne)
except:
self.fail("SimpleHistory should handle foreign keys to one to one"
"fields to one to one fields without throwing an "
"exception.")