当前位置: 首页>>代码示例>>Python>>正文


Python models.HistoricalRecords类代码示例

本文整理汇总了Python中simple_history.models.HistoricalRecords的典型用法代码示例。如果您正苦于以下问题:Python HistoricalRecords类的具体用法?Python HistoricalRecords怎么用?Python HistoricalRecords使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了HistoricalRecords类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_create_history_model_with_one_to_one_field_to_char_field

 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.")
开发者ID:dgreisen-cfpb,项目名称:django-simple-history,代码行数:8,代码来源:tests.py

示例2: test_create_history_model_with_one_to_one_field_to_integer_field

 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")
开发者ID:dgreisen-cfpb,项目名称:django-simple-history,代码行数:8,代码来源:tests.py

示例3: test_create_history_model_with_multiple_one_to_ones

 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.")
开发者ID:dgreisen-cfpb,项目名称:django-simple-history,代码行数:9,代码来源:tests.py


注:本文中的simple_history.models.HistoricalRecords类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。