當前位置: 首頁>>代碼示例>>Python>>正文


Python MigrationHistory.app_name方法代碼示例

本文整理匯總了Python中south.models.MigrationHistory.app_name方法的典型用法代碼示例。如果您正苦於以下問題:Python MigrationHistory.app_name方法的具體用法?Python MigrationHistory.app_name怎麽用?Python MigrationHistory.app_name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在south.models.MigrationHistory的用法示例。


在下文中一共展示了MigrationHistory.app_name方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: import_data

# 需要導入模塊: from south.models import MigrationHistory [as 別名]
# 或者: from south.models.MigrationHistory import app_name [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.app_name方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。