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


Python MigrationHistory.applied方法代码示例

本文整理汇总了Python中south.models.MigrationHistory.applied方法的典型用法代码示例。如果您正苦于以下问题:Python MigrationHistory.applied方法的具体用法?Python MigrationHistory.applied怎么用?Python MigrationHistory.applied使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在south.models.MigrationHistory的用法示例。


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

示例1: import_data

# 需要导入模块: from south.models import MigrationHistory [as 别名]
# 或者: from south.models.MigrationHistory import applied [as 别名]
def import_data():
    #initial imports

    #Processing model: Snippet

    from caravana4site.models import Snippet


    #Processing model: Units

    from caravana4site.models import Units


    #Processing model: ProductCategorie

    from caravana4site.models import ProductCategorie

    caravana4site_productcategorie_1 = ProductCategorie()
    caravana4site_productcategorie_1.name = u'Ternera'
    caravana4site_productcategorie_1 = importer.save_or_locate(caravana4site_productcategorie_1)

    caravana4site_productcategorie_2 = ProductCategorie()
    caravana4site_productcategorie_2.name = u'Pollo'
    caravana4site_productcategorie_2 = importer.save_or_locate(caravana4site_productcategorie_2)

    caravana4site_productcategorie_3 = ProductCategorie()
    caravana4site_productcategorie_3.name = u'Novillos'
    caravana4site_productcategorie_3 = importer.save_or_locate(caravana4site_productcategorie_3)

    caravana4site_productcategorie_4 = ProductCategorie()
    caravana4site_productcategorie_4.name = u'L\xe1cteos'
    caravana4site_productcategorie_4 = importer.save_or_locate(caravana4site_productcategorie_4)

    caravana4site_productcategorie_5 = ProductCategorie()
    caravana4site_productcategorie_5.name = u'Menudencias'
    caravana4site_productcategorie_5 = importer.save_or_locate(caravana4site_productcategorie_5)

    caravana4site_productcategorie_6 = ProductCategorie()
    caravana4site_productcategorie_6.name = u'Cerdos'
    caravana4site_productcategorie_6 = importer.save_or_locate(caravana4site_productcategorie_6)

    caravana4site_productcategorie_7 = ProductCategorie()
    caravana4site_productcategorie_7.name = u'Corderos'
    caravana4site_productcategorie_7 = importer.save_or_locate(caravana4site_productcategorie_7)

    caravana4site_productcategorie_8 = ProductCategorie()
    caravana4site_productcategorie_8.name = u'Chivitos'
    caravana4site_productcategorie_8 = importer.save_or_locate(caravana4site_productcategorie_8)

    caravana4site_productcategorie_9 = ProductCategorie()
    caravana4site_productcategorie_9.name = u'Conejos'
    caravana4site_productcategorie_9 = importer.save_or_locate(caravana4site_productcategorie_9)

    caravana4site_productcategorie_10 = ProductCategorie()
    caravana4site_productcategorie_10.name = u'Elaborados'
    caravana4site_productcategorie_10 = importer.save_or_locate(caravana4site_productcategorie_10)

    #Processing model: MigrationHistory

    from south.models import MigrationHistory

    south_migrationhistory_1 = MigrationHistory()
    south_migrationhistory_1.app_name = u'caravana4site'
    south_migrationhistory_1.migration = u'0001_initial'
    south_migrationhistory_1.applied = dateutil.parser.parse("2014-01-02T01:51:38.318328+00:00")
    south_migrationhistory_1 = importer.save_or_locate(south_migrationhistory_1)

    south_migrationhistory_2 = MigrationHistory()
    south_migrationhistory_2.app_name = u'caravana4site'
    south_migrationhistory_2.migration = u'0002_auto__add_field_homecarouseloffert_start_date__add_field_homecarouselo'
    south_migrationhistory_2.applied = dateutil.parser.parse("2014-01-05T16:51:39.517145+00:00")
    south_migrationhistory_2 = importer.save_or_locate(south_migrationhistory_2)

    south_migrationhistory_3 = MigrationHistory()
    south_migrationhistory_3.app_name = u'caravana4site'
    south_migrationhistory_3.migration = u'0003_auto__add_productcategorie__chg_field_product_price__chg_field_product'
    south_migrationhistory_3.applied = dateutil.parser.parse("2014-01-19T21:02:05.052134+00:00")
    south_migrationhistory_3 = importer.save_or_locate(south_migrationhistory_3)

    south_migrationhistory_4 = MigrationHistory()
    south_migrationhistory_4.app_name = u'caravana4site'
    south_migrationhistory_4.migration = u'0004_auto__del_field_product_cost__del_field_product_created__del_field_pro'
    south_migrationhistory_4.applied = dateutil.parser.parse("2014-01-19T22:36:43.132356+00:00")
    south_migrationhistory_4 = importer.save_or_locate(south_migrationhistory_4)

    south_migrationhistory_5 = MigrationHistory()
    south_migrationhistory_5.app_name = u'caravana4site'
    south_migrationhistory_5.migration = u'0005_auto__add_field_product_category'
    south_migrationhistory_5.applied = dateutil.parser.parse("2014-01-19T22:44:57.623181+00:00")
    south_migrationhistory_5 = importer.save_or_locate(south_migrationhistory_5)

    south_migrationhistory_6 = MigrationHistory()
    south_migrationhistory_6.app_name = u'caravana4site'
    south_migrationhistory_6.migration = u'0006_auto__chg_field_product_picture'
    south_migrationhistory_6.applied = dateutil.parser.parse("2014-01-21T00:25:11.857792+00:00")
    south_migrationhistory_6 = importer.save_or_locate(south_migrationhistory_6)

    south_migrationhistory_7 = MigrationHistory()
    south_migrationhistory_7.app_name = u'caravana4site'
    south_migrationhistory_7.migration = u'0007_auto__add_productdetail'
#.........这里部分代码省略.........
开发者ID:CatBakun,项目名称:caravana4,代码行数:103,代码来源:testdata.py


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