• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python db.shorten_name函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: forwards

    def forwards(self, orm):
        # Adding model 'Usuario'
        db.create_table(u'skeleton_usuario', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('password', self.gf('django.db.models.fields.CharField')(max_length=128)),
            ('last_login', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
            ('is_superuser', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('usuario', self.gf('django.db.models.fields.CharField')(unique=True, max_length=15, db_index=True)),
            ('email', self.gf('django.db.models.fields.EmailField')(max_length=50, null=True, blank=True)),
            ('nombre', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('apellidos', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('fecha', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
            ('fecha_mod', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
            ('is_active', self.gf('django.db.models.fields.BooleanField')(default=True)),
            ('is_admin', self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('skeleton', ['Usuario'])

        # Adding M2M table for field groups on 'Usuario'
        m2m_table_name = db.shorten_name(u'skeleton_usuario_groups')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('usuario', models.ForeignKey(orm['skeleton.usuario'], null=False)),
            ('group', models.ForeignKey(orm[u'auth.group'], null=False))
        ))
        db.create_unique(m2m_table_name, ['usuario_id', 'group_id'])

        # Adding M2M table for field user_permissions on 'Usuario'
        m2m_table_name = db.shorten_name(u'skeleton_usuario_user_permissions')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('usuario', models.ForeignKey(orm['skeleton.usuario'], null=False)),
            ('permission', models.ForeignKey(orm[u'auth.permission'], null=False))
        ))
        db.create_unique(m2m_table_name, ['usuario_id', 'permission_id'])
开发者ID:mchaparro,项目名称:Skeleton-Django1.6-Bootstrap-3.0,代码行数:35,代码来源:0001_initial.py


示例2: backwards

    def backwards(self, orm):
        # Deleting model 'Language'
        db.delete_table(u'events_language')

        # Deleting model 'Organization'
        db.delete_table(u'events_organization')

        # Deleting model 'Category'
        db.delete_table(u'events_category')

        # Deleting model 'PlacePostalAddress'
        db.delete_table(u'events_placepostaladdress')

        # Deleting model 'Place'
        db.delete_table(u'events_place')

        # Deleting model 'Offer'
        db.delete_table(u'events_offer')

        # Deleting model 'Event'
        db.delete_table(u'events_event')

        # Removing M2M table for field categories on 'Event'
        db.delete_table(db.shorten_name(u'events_event_categories'))

        # Removing M2M table for field offers on 'Event'
        db.delete_table(db.shorten_name(u'events_event_offers'))
开发者ID:thanhiro,项目名称:linkedevents,代码行数:27,代码来源:0001_initial.py


示例3: forwards

    def forwards(self, orm):
        # Adding model 'ClassSession'
        db.create_table(u'class_sessions_classsession', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('title', self.gf('django.db.models.fields.CharField')(max_length=200)),
            ('description', self.gf('django.db.models.fields.TextField')()),
            ('session_start', self.gf('django.db.models.fields.DateTimeField')()),
            ('session_end', self.gf('django.db.models.fields.DateTimeField')()),
            ('class_type', self.gf('django.db.models.fields.CharField')(max_length=25)),
            ('teacher', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['teachers.TeacherProfile'])),
            ('fee', self.gf('django.db.models.fields.FloatField')()),
            ('session_id', self.gf('django.db.models.fields.CharField')(max_length=100, blank=True)),
        ))
        db.send_create_signal(u'class_sessions', ['ClassSession'])

        # Adding M2M table for field students on 'ClassSession'
        m2m_table_name = db.shorten_name(u'class_sessions_classsession_students')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('classsession', models.ForeignKey(orm[u'class_sessions.classsession'], null=False)),
            ('userprofile', models.ForeignKey(orm[u'core.userprofile'], null=False))
        ))
        db.create_unique(m2m_table_name, ['classsession_id', 'userprofile_id'])

        # Adding M2M table for field files on 'ClassSession'
        m2m_table_name = db.shorten_name(u'class_sessions_classsession_files')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('classsession', models.ForeignKey(orm[u'class_sessions.classsession'], null=False)),
            ('teacherfile', models.ForeignKey(orm[u'teachers.teacherfile'], null=False))
        ))
        db.create_unique(m2m_table_name, ['classsession_id', 'teacherfile_id'])
开发者ID:dave-worley,项目名称:vimusi,代码行数:32,代码来源:0001_initial.py


示例4: forwards

    def forwards(self, orm):
        # Adding M2M table for field tags on 'Seance'
        m2m_table_name = db.shorten_name(u'contenus_seance_tags')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('seance', models.ForeignKey(orm[u'contenus.seance'], null=False)),
            ('tag', models.ForeignKey(orm[u'programme.tag'], null=False))
        ))
        db.create_unique(m2m_table_name, ['seance_id', 'tag_id'])

        # Adding M2M table for field tags on 'Item'
        m2m_table_name = db.shorten_name(u'contenus_item_tags')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('item', models.ForeignKey(orm[u'contenus.item'], null=False)),
            ('tag', models.ForeignKey(orm[u'programme.tag'], null=False))
        ))
        db.create_unique(m2m_table_name, ['item_id', 'tag_id'])

        # Adding M2M table for field tags on 'Theme'
        m2m_table_name = db.shorten_name(u'contenus_theme_tags')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('theme', models.ForeignKey(orm[u'contenus.theme'], null=False)),
            ('tag', models.ForeignKey(orm[u'programme.tag'], null=False))
        ))
        db.create_unique(m2m_table_name, ['theme_id', 'tag_id'])
开发者ID:jmbarbier,项目名称:speisn,代码行数:27,代码来源:0002_auto.py


示例5: backwards

    def backwards(self, orm):
        # Deleting model 'Player'
        db.delete_table(u'play_player')

        # Deleting model 'Shop'
        db.delete_table(u'play_shop')

        # Deleting model 'Organization'
        db.delete_table(u'play_organization')

        # Deleting model 'Coupon'
        db.delete_table(u'play_coupon')

        # Removing M2M table for field buyers on 'Coupon'
        db.delete_table(db.shorten_name(u'play_coupon_buyers'))

        # Deleting model 'Event'
        db.delete_table(u'play_event')

        # Removing M2M table for field participants on 'Event'
        db.delete_table(db.shorten_name(u'play_event_participants'))

        # Deleting model 'Challenge'
        db.delete_table(u'play_challenge')

        # Removing M2M table for field participants on 'Challenge'
        db.delete_table(db.shorten_name(u'play_challenge_participants'))

        # Deleting model 'CouponHistory'
        db.delete_table(u'play_couponhistory')

        # Deleting model 'EventHistory'
        db.delete_table(u'play_eventhistory')
开发者ID:PlayPaloAlto,项目名称:PlayPaloAlto_server,代码行数:33,代码来源:0001_initial.py


示例6: backwards

    def backwards(self, orm):
        # Deleting field 'CartItem.cart'
        db.delete_column(u"carts_cartitem", "cart_id")

        # Deleting field 'CartItem.line_total'
        db.delete_column(u"carts_cartitem", "line_total")

        # Adding M2M table for field products on 'Cart'
        m2m_table_name = db.shorten_name(u"carts_cart_products")
        db.create_table(
            m2m_table_name,
            (
                ("id", models.AutoField(verbose_name="ID", primary_key=True, auto_created=True)),
                ("cart", models.ForeignKey(orm[u"carts.cart"], null=False)),
                ("product", models.ForeignKey(orm[u"products.product"], null=False)),
            ),
        )
        db.create_unique(m2m_table_name, ["cart_id", "product_id"])

        # Adding M2M table for field items on 'Cart'
        m2m_table_name = db.shorten_name(u"carts_cart_items")
        db.create_table(
            m2m_table_name,
            (
                ("id", models.AutoField(verbose_name="ID", primary_key=True, auto_created=True)),
                ("cart", models.ForeignKey(orm[u"carts.cart"], null=False)),
                ("cartitem", models.ForeignKey(orm[u"carts.cartitem"], null=False)),
            ),
        )
        db.create_unique(m2m_table_name, ["cart_id", "cartitem_id"])
开发者ID:loafbaker,项目名称:django_ecommerce1,代码行数:30,代码来源:0003_auto__add_field_cartitem_cart__add_field_cartitem_line_total.py


示例7: backwards

    def backwards(self, orm):
        # Removing unique constraint on 'FacebookInvite', fields ['user', 'user_invited']
        db.delete_unique('django_facebook_facebook_invite', ['user_id', 'user_invited'])

        # Removing unique constraint on 'FacebookLike', fields ['user_id', 'facebook_id']
        db.delete_unique(u'django_facebook_facebooklike', ['user_id', 'facebook_id'])

        # Removing unique constraint on 'FacebookUser', fields ['user_id', 'facebook_id']
        db.delete_unique(u'django_facebook_facebookuser', ['user_id', 'facebook_id'])

        # Deleting model 'FacebookUser'
        db.delete_table(u'django_facebook_facebookuser')

        # Deleting model 'FacebookLike'
        db.delete_table(u'django_facebook_facebooklike')

        # Deleting model 'FacebookProfile'
        db.delete_table(u'django_facebook_facebookprofile')

        # Deleting model 'FacebookCustomUser'
        db.delete_table(u'django_facebook_facebookcustomuser')

        # Removing M2M table for field groups on 'FacebookCustomUser'
        db.delete_table(db.shorten_name(u'django_facebook_facebookcustomuser_groups'))

        # Removing M2M table for field user_permissions on 'FacebookCustomUser'
        db.delete_table(db.shorten_name(u'django_facebook_facebookcustomuser_user_permissions'))

        # Deleting model 'OpenGraphShare'
        db.delete_table('django_facebook_open_graph_share')

        # Deleting model 'FacebookInvite'
        db.delete_table('django_facebook_facebook_invite')
开发者ID:ButchershopCreative,项目名称:Django-facebook,代码行数:33,代码来源:0001_initial.py


示例8: forwards

    def forwards(self, orm):
        # Adding model 'Faction'
        db.create_table('representative_faction', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=255, null=True)),
            ('short', self.gf('django.db.models.fields.CharField')(max_length=32, null=True)),
        ))
        db.send_create_signal('representative', ['Faction'])

        # Deleting field 'Representative.faction_en'
        db.delete_column('representative_representative', 'faction_en')

        # Deleting field 'Representative.faction_ka'
        db.delete_column('representative_representative', 'faction_ka')


        # Renaming column for 'Representative.faction' to match new field type.
        db.rename_column('representative_representative', 'faction', 'faction_id')
        # Changing field 'Representative.faction'
        db.alter_column('representative_representative', 'faction_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['representative.Faction']))
        # Adding index on 'Representative', fields ['faction']
        db.create_index('representative_representative', ['faction_id'])

        # Removing M2M table for field parties on 'Cabinet'
        db.delete_table(db.shorten_name('representative_cabinet_parties'))

        # Adding M2M table for field factions on 'Cabinet'
        m2m_table_name = db.shorten_name('representative_cabinet_factions')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('cabinet', models.ForeignKey(orm['representative.cabinet'], null=False)),
            ('faction', models.ForeignKey(orm['representative.faction'], null=False))
        ))
        db.create_unique(m2m_table_name, ['cabinet_id', 'faction_id'])
开发者ID:araneta,项目名称:shenmartav,代码行数:34,代码来源:0024_auto__add_faction__del_field_representative_faction_en__del_field_repr.py


示例9: backwards

    def backwards(self, orm):
        # Deleting model 'Document2'
        db.delete_table('desktop_document2')

        # Removing M2M table for field tags on 'Document2'
        db.delete_table(db.shorten_name('desktop_document2_tags'))

        # Removing M2M table for field dependencies on 'Document2'
        db.delete_table(db.shorten_name('desktop_document2_dependencies'))


        # Changing field 'UserPreferences.key'
        db.alter_column('desktop_userpreferences', 'key', self.gf('django.db.models.fields.CharField')(max_length=20, null=True))

        # Changing field 'UserPreferences.value'
        db.alter_column('desktop_userpreferences', 'value', self.gf('django.db.models.fields.TextField')(max_length=4096, null=True))

        # Changing field 'DocumentPermission.perms'
        db.alter_column('desktop_documentpermission', 'perms', self.gf('django.db.models.fields.TextField')(null=True))

        # Changing field 'DocumentTag.tag'
        db.alter_column('desktop_documenttag', 'tag', self.gf('django.db.models.fields.SlugField')(max_length=50, null=True))

        # Changing field 'Document.extra'
        db.alter_column('desktop_document', 'extra', self.gf('django.db.models.fields.TextField')(null=True))

        # Changing field 'Document.name'
        db.alter_column('desktop_document', 'name', self.gf('django.db.models.fields.CharField')(max_length=255, null=True))

        # Changing field 'Document.description'
        db.alter_column('desktop_document', 'description', self.gf('django.db.models.fields.TextField')(null=True))
开发者ID:18600597055,项目名称:hue,代码行数:31,代码来源:0010_auto__add_document2__chg_field_userpreferences_key__chg_field_userpref.py


示例10: backwards

    def backwards(self, orm):
        # Deleting model 'Category'
        db.delete_table(u'book_category')

        # Deleting model 'Book'
        db.delete_table(u'book_book')

        # Removing M2M table for field categories on 'Book'
        db.delete_table(db.shorten_name(u'book_book_categories'))

        # Removing M2M table for field sites on 'Book'
        db.delete_table(db.shorten_name(u'book_book_sites'))

        # Deleting model 'BookType'
        db.delete_table(u'book_booktype')

        # Deleting model 'Author'
        db.delete_table(u'book_author')

        # Deleting model 'Type'
        db.delete_table(u'book_type')

        # Deleting model 'Chapter'
        db.delete_table(u'book_chapter')

        # Deleting model 'ChapterType'
        db.delete_table(u'book_chaptertype')
开发者ID:squallcs12,项目名称:tangthuvien,代码行数:27,代码来源:0001_initial.py


示例11: backwards

    def backwards(self, orm):
        # Removing index on 'Representative', fields ['faction']
        db.delete_index('representative_representative', ['faction_id'])

        # Deleting model 'Faction'
        db.delete_table('representative_faction')

        # Adding field 'Representative.faction_en'
        db.add_column('representative_representative', 'faction_en',
                      self.gf('django.db.models.fields.TextField')(null=True, blank=True),
                      keep_default=False)

        # Adding field 'Representative.faction_ka'
        db.add_column('representative_representative', 'faction_ka',
                      self.gf('django.db.models.fields.TextField')(null=True, blank=True),
                      keep_default=False)


        # Renaming column for 'Representative.faction' to match new field type.
        db.rename_column('representative_representative', 'faction_id', 'faction')
        # Changing field 'Representative.faction'
        db.alter_column('representative_representative', 'faction', self.gf('django.db.models.fields.TextField')(null=True))
        # Adding M2M table for field parties on 'Cabinet'
        m2m_table_name = db.shorten_name('representative_cabinet_parties')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('cabinet', models.ForeignKey(orm['representative.cabinet'], null=False)),
            ('party', models.ForeignKey(orm['representative.party'], null=False))
        ))
        db.create_unique(m2m_table_name, ['cabinet_id', 'party_id'])

        # Removing M2M table for field factions on 'Cabinet'
        db.delete_table(db.shorten_name('representative_cabinet_factions'))
开发者ID:araneta,项目名称:shenmartav,代码行数:33,代码来源:0024_auto__add_faction__del_field_representative_faction_en__del_field_repr.py


示例12: backwards

    def backwards(self, orm):
        # Deleting model 'Narzedzia'
        db.delete_table(u"base_narzedzia")

        # Deleting model 'Rok'
        db.delete_table(u"base_rok")

        # Deleting model 'Okres'
        db.delete_table(u"base_okres")

        # Removing M2M table for field narzedzia on 'Okres'
        db.delete_table(db.shorten_name(u"base_okres_narzedzia"))

        # Deleting model 'Blad'
        db.delete_table(u"base_blad")

        # Removing M2M table for field narzedzie on 'Blad'
        db.delete_table(db.shorten_name(u"base_blad_narzedzie"))

        # Deleting model 'Tradycja'
        db.delete_table(u"base_tradycja")

        # Deleting model 'Pomysl'
        db.delete_table(u"base_pomysl")

        # Deleting model 'Komentarz'
        db.delete_table(u"base_komentarz")
开发者ID:pulina,项目名称:supermarket_metodyczny,代码行数:27,代码来源:0001_initial.py


示例13: backwards

    def backwards(self, orm):
        # Deleting model 'Choices'
        db.delete_table(u'core_choices')

        # Deleting model 'User'
        db.delete_table(u'core_user')

        # Removing M2M table for field groups on 'User'
        db.delete_table(db.shorten_name(u'core_user_groups'))

        # Removing M2M table for field user_permissions on 'User'
        db.delete_table(db.shorten_name(u'core_user_user_permissions'))

        # Deleting model 'Competition'
        db.delete_table(u'core_competition')

        # Deleting model 'Distance'
        db.delete_table(u'core_distance')

        # Deleting model 'InsuranceCompany'
        db.delete_table(u'core_insurancecompany')

        # Deleting model 'Insurance'
        db.delete_table(u'core_insurance')

        # Deleting model 'CustomSlug'
        db.delete_table(u'core_customslug')

        # Deleting model 'Log'
        db.delete_table(u'core_log')

        # Deleting model 'Map'
        db.delete_table(u'core_map')
开发者ID:martinsv,项目名称:velo.lv,代码行数:33,代码来源:0001_initial.py


示例14: forwards

    def forwards(self, orm):
        # Adding model 'Person'
        db.create_table(u'legacy_person', (
            ('user', self.gf('django.db.models.fields.CharField')(max_length=200, primary_key=True)),
        ))
        db.send_create_signal(u'legacy', ['Person'])

        # Adding M2M table for field upvotes on 'Person'
        m2m_table_name = db.shorten_name(u'legacy_person_upvotes')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('person', models.ForeignKey(orm[u'legacy.person'], null=False)),
            ('comment', models.ForeignKey(orm[u'legacy.comment'], null=False))
        ))
        db.create_unique(m2m_table_name, ['person_id', 'comment_id'])

        # Adding M2M table for field downvotes on 'Person'
        m2m_table_name = db.shorten_name(u'legacy_person_downvotes')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('person', models.ForeignKey(orm[u'legacy.person'], null=False)),
            ('comment', models.ForeignKey(orm[u'legacy.comment'], null=False))
        ))
        db.create_unique(m2m_table_name, ['person_id', 'comment_id'])

        # Adding model 'Comment'
        db.create_table(u'legacy_comment', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('owner', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['legacy.Person'])),
            ('text', self.gf('django.db.models.fields.TextField')()),
            ('upvotes', self.gf('django.db.models.fields.IntegerField')(default=0)),
            ('downvotes', self.gf('django.db.models.fields.IntegerField')(default=0)),
            ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
        ))
        db.send_create_signal(u'legacy', ['Comment'])
开发者ID:fizzy123,项目名称:legacy,代码行数:35,代码来源:0001_initial.py


示例15: backwards

    def backwards(self, orm):
        # Deleting model 'Monitorable'
        db.delete_table(u'projects_monitorable')

        # Removing M2M table for field subjects on 'Monitorable'
        db.delete_table(db.shorten_name(u'projects_monitorable_subjects'))

        # Removing M2M table for field locations on 'Monitorable'
        db.delete_table(db.shorten_name(u'projects_monitorable_locations'))

        # Deleting model 'Project'
        db.delete_table(u'projects_project')

        # Deleting model 'Good'
        db.delete_table(u'projects_good')

        # Deleting model 'Location'
        db.delete_table(u'projects_location')

        # Deleting model 'Geo'
        db.delete_table(u'projects_geo')

        # Deleting model 'Subject'
        db.delete_table(u'projects_subject')

        # Deleting model 'Tags'
        db.delete_table(u'projects_tags')

        # Deleting model 'Layer'
        db.delete_table(u'projects_layer')

        # Removing M2M table for field projects on 'Layer'
        db.delete_table(db.shorten_name(u'projects_layer_projects'))
开发者ID:Monithon,项目名称:Monithon-2.0,代码行数:33,代码来源:0001_initial.py


示例16: backwards

    def backwards(self, orm):
        # Removing unique constraint on 'HotlineEvent', fields ['identity', 'received_on']
        db.delete_unique(u'dispatcher_hotlineevent', ['identity', 'received_on'])

        # Deleting model 'HotlineEvent'
        db.delete_table(u'dispatcher_hotlineevent')

        # Deleting model 'HotlineVolunteer'
        db.delete_table(u'dispatcher_hotlinevolunteer')

        # Removing M2M table for field groups on 'HotlineVolunteer'
        db.delete_table(db.shorten_name(u'dispatcher_hotlinevolunteer_groups'))

        # Removing M2M table for field user_permissions on 'HotlineVolunteer'
        db.delete_table(db.shorten_name(u'dispatcher_hotlinevolunteer_user_permissions'))

        # Deleting model 'HotlineResponse'
        db.delete_table(u'dispatcher_hotlineresponse')

        # Removing M2M table for field topics on 'HotlineResponse'
        db.delete_table(db.shorten_name(u'dispatcher_hotlineresponse_topics'))

        # Deleting model 'Entity'
        db.delete_table(u'dispatcher_entity')

        # Deleting model 'Topics'
        db.delete_table(u'dispatcher_topics')

        # Deleting model 'BlackList'
        db.delete_table(u'dispatcher_blacklist')
开发者ID:jokkolabs,项目名称:hotline_dispatch,代码行数:30,代码来源:0001_initial.py


示例17: backwards

    def backwards(self, orm):
        # Deleting model 'Badge'
        db.delete_table(u'game_badge')

        # Deleting model 'Level'
        db.delete_table(u'game_level')

        # Deleting model 'Problem'
        db.delete_table(u'game_problem')

        # Deleting model 'AddSubProblem'
        db.delete_table(u'game_addsubproblem')

        # Deleting model 'IdentificationProblem'
        db.delete_table(u'game_identificationproblem')

        # Deleting model 'Student'
        db.delete_table(u'game_student')

        # Removing M2M table for field levels on 'Student'
        db.delete_table(db.shorten_name(u'game_student_levels'))

        # Removing M2M table for field badges on 'Student'
        db.delete_table(db.shorten_name(u'game_student_badges'))

        # Deleting model 'LevelStat'
        db.delete_table(u'game_levelstat')
开发者ID:nicolet2132,项目名称:knack_Math,代码行数:27,代码来源:0001_initial.py


示例18: backwards

    def backwards(self, orm):
        # Deleting model 'Address'
        db.delete_table(u'accounts_address')

        # Deleting model 'UserProfile'
        db.delete_table(u'accounts_userprofile')

        # Removing M2M table for field addresses on 'UserProfile'
        db.delete_table(db.shorten_name(u'accounts_userprofile_addresses'))

        # Deleting model 'Shop'
        db.delete_table(u'accounts_shop')

        # Deleting model 'Client'
        db.delete_table(u'accounts_client')

        # Deleting model 'Chat'
        db.delete_table(u'accounts_chat')

        # Removing M2M table for field users on 'Chat'
        db.delete_table(db.shorten_name(u'accounts_chat_users'))

        # Deleting model 'Post'
        db.delete_table(u'accounts_post')

        # Deleting model 'PostComment'
        db.delete_table(u'accounts_postcomment')
开发者ID:SlavaAf,项目名称:partcom,代码行数:27,代码来源:0001_initial.py


示例19: backwards

    def backwards(self, orm):
        # Removing unique constraint on 'TestplanTestcaseLink', fields ['testcase', 'testplan']
        db.delete_unique('ecapp_testplantestcaselink', ['testcase_id', 'testplan_id'])

        # Removing unique constraint on 'Folder', fields ['name', 'parent']
        db.delete_unique('ecapp_folder', ['name', 'parent_id'])

        # Deleting model 'Folder'
        db.delete_table('ecapp_folder')

        # Deleting model 'DesignStep'
        db.delete_table('ecapp_designstep')

        # Deleting model 'UploadedFile'
        db.delete_table('ecapp_uploadedfile')

        # Deleting model 'TestCase'
        db.delete_table('ecapp_testcase')

        # Removing M2M table for field design_steps on 'TestCase'
        db.delete_table(db.shorten_name('ecapp_testcase_design_steps'))

        # Removing M2M table for field uploads on 'TestCase'
        db.delete_table(db.shorten_name('ecapp_testcase_uploads'))

        # Deleting model 'TestPlan'
        db.delete_table('ecapp_testplan')

        # Deleting model 'TestplanTestcaseLink'
        db.delete_table('ecapp_testplantestcaselink')

        # Deleting model 'Result'
        db.delete_table('ecapp_result')
开发者ID:dbhati,项目名称:ExtensionCord,代码行数:33,代码来源:0001_initial.py


示例20: forwards

    def forwards(self, orm):
        # Deleting model 'Gruppo'
        db.delete_table(u'calendario_gruppo')

        # Removing M2M table for field componenti on 'Gruppo'
        db.delete_table(db.shorten_name(u'calendario_gruppo_componenti'))

        # Deleting model 'Mansione'
        db.delete_table(u'calendario_mansione')

        # Deleting model 'Persona'
        db.delete_table(u'calendario_persona')

        # Removing M2M table for field competenze on 'Persona'
        db.delete_table(db.shorten_name(u'calendario_persona_competenze'))


        # Changing field 'Impostazioni_notifica.giorni'
        db.alter_column(u'calendario_impostazioni_notifica', 'giorni', self.gf('persone.models.MultiSelectField')(max_length=250))

        # Changing field 'Disponibilita.mansione'
        db.alter_column(u'calendario_disponibilita', 'mansione_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, on_delete=models.SET_NULL, to=orm['persone.Mansione']))

        # Changing field 'Disponibilita.persona'
        db.alter_column(u'calendario_disponibilita', 'persona_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['persone.Persona']))

        # Changing field 'Requisito.mansione'
        db.alter_column(u'calendario_requisito', 'mansione_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['persone.Mansione']))
开发者ID:Unica,项目名称:get2,代码行数:28,代码来源:0038_auto__del_gruppo__del_mansione__del_persona__chg_field_impostazioni_no.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python db.start_transaction函数代码示例发布时间:2022-05-27
下一篇:
Python db.send_create_signal函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap