本文整理汇总了Python中south.utils.datetime_utils.datetime函数的典型用法代码示例。如果您正苦于以下问题:Python datetime函数的具体用法?Python datetime怎么用?Python datetime使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了datetime函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: backwards
def backwards(self, orm):
# Adding field 'Knight.of_the_round_table'
db.add_column(u'southtut_knight', 'of_the_round_table',
self.gf('django.db.models.fields.BooleanField')(default=datetime.datetime(2014, 6, 17, 0, 0)),
keep_default=False)
# Adding field 'Knight.name'
db.add_column(u'southtut_knight', 'name',
self.gf('django.db.models.fields.CharField')(default=datetime.datetime(2014, 6, 17, 0, 0), max_length=100),
keep_default=False)
# Adding field 'Knight.wherever'
db.add_column(u'southtut_knight', 'wherever',
self.gf('django.db.models.fields.CharField')(default='', max_length=100),
keep_default=False)
# Adding field 'Knight.dances_wherever'
db.add_column(u'southtut_knight', 'dances_wherever',
self.gf('django.db.models.fields.CharField')(default='', max_length=100),
keep_default=False)
# Deleting field 'Knight.first_name'
db.delete_column(u'southtut_knight', 'first_name')
# Deleting field 'Knight.last_name'
db.delete_column(u'southtut_knight', 'last_name')
开发者ID:nagendra999,项目名称:test,代码行数:26,代码来源:0005_auto__del_field_knight_of_the_round_table__del_field_knight_name__del_.py
示例2: forwards
def forwards(self, orm):
# Adding model 'Expertise'
db.create_table(u'Guess_expertise', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('expert', self.gf('django.db.models.fields.related.ForeignKey')(related_name='expert', to=orm['Guess.Person'])),
('tag', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['Guess.GameTag'])),
('score', self.gf('django.db.models.fields.FloatField')(default=0)),
))
db.send_create_signal(u'Guess', ['Expertise'])
# Adding field 'Game.weight_home'
db.add_column(u'Guess_game', 'weight_home',
self.gf('django.db.models.fields.IntegerField')(default=0),
keep_default=False)
# Adding field 'Game.weight_away'
db.add_column(u'Guess_game', 'weight_away',
self.gf('django.db.models.fields.IntegerField')(default=0),
keep_default=False)
# Adding field 'Betting.buy_time'
db.add_column(u'Guess_betting', 'buy_time',
self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 11, 26, 0, 0)),
keep_default=False)
# Adding field 'Betting.sell_time'
db.add_column(u'Guess_betting', 'sell_time',
self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 11, 26, 0, 0)),
keep_default=False)
# Adding field 'Betting.win'
db.add_column(u'Guess_betting', 'win',
self.gf('django.db.models.fields.BooleanField')(default=False),
keep_default=False)
开发者ID:StevenSLXie,项目名称:GuessWhat,代码行数:34,代码来源:0021_auto__add_expertise__add_field_game_weight_home__add_field_game_weight.py
示例3: backwards
def backwards(self, orm):
# Adding field 'Course.end_time'
db.add_column(u'courses_course', 'end_time',
self.gf('django.db.models.fields.DateField')(default=datetime.datetime(2014, 4, 19, 0, 0)),
keep_default=False)
# Adding field 'Course.start_time'
db.add_column(u'courses_course', 'start_time',
self.gf('django.db.models.fields.DateField')(default=datetime.datetime(2014, 4, 19, 0, 0)),
keep_default=False)
# Adding field 'Course.enable_applications'
db.add_column(u'courses_course', 'enable_applications',
self.gf('django.db.models.fields.BooleanField')(default=False),
keep_default=False)
# Deleting field 'Course.application_until'
db.delete_column(u'courses_course', 'application_until')
# Deleting field 'Course.next_season_mail_list'
db.delete_column(u'courses_course', 'next_season_mail_list')
# Changing field 'Course.description'
db.alter_column(u'courses_course', 'description', self.gf('django.db.models.fields.TextField')())
开发者ID:sebastian-code,项目名称:Odin,代码行数:25,代码来源:0010_auto__del_field_course_end_time__del_field_course_start_time__del_fiel.py
示例4: backwards
def backwards(self, orm):
# Adding field 'HitCount.created'
db.add_column(
u"pageviews_hitcount",
"created",
self.gf("django.db.models.fields.DateTimeField")(
auto_now_add=True, default=datetime.datetime(2014, 3, 3, 0, 0), blank=True
),
keep_default=False,
)
# Adding field 'HitCount.modified'
db.add_column(
u"pageviews_hitcount",
"modified",
self.gf("django.db.models.fields.DateTimeField")(
auto_now=True, default=datetime.datetime(2014, 3, 3, 0, 0), blank=True
),
keep_default=False,
)
# Deleting field 'HitCount.created_at'
db.delete_column("pageviews_hitcount", "created_at")
# Deleting field 'HitCount.updated_at'
db.delete_column("pageviews_hitcount", "updated_at")
# Deleting field 'HitCount.content_type'
db.delete_column("pageviews_hitcount", "content_type_id")
# Deleting field 'HitCount.object_id'
db.delete_column("pageviews_hitcount", "object_id")
# Deleting field 'HitCount.for_date'
db.delete_column("pageviews_hitcount", "for_date")
开发者ID:jonykalavera,项目名称:django-pageviews,代码行数:35,代码来源:0002_auto__del_field_hitcount_created__del_field_hitcount_modified__add_fie.py
示例5: forwards
def forwards(self, orm):
# Adding model 'Accommodation'
db.create_table(u'Accommodations_accommodation', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(max_length=50)),
('description', self.gf('django.db.models.fields.TextField')(default='', max_length=500)),
('room_size', self.gf('django.db.models.fields.CharField')(max_length=3)),
('room_type', self.gf('django.db.models.fields.CharField')(max_length=3)),
('main_photo', self.gf('django.db.models.fields.files.ImageField')(max_length=100, null=True, blank=True)),
('price_per_day', self.gf('django.db.models.fields.FloatField')(default=0.0)),
('price_per_month', self.gf('django.db.models.fields.FloatField')(default=0.0)),
))
db.send_create_signal(u'Accommodations', ['Accommodation'])
# Adding model 'AccommodationPhoto'
db.create_table(u'Accommodations_accommodationphoto', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('title', self.gf('django.db.models.fields.CharField')(default='', max_length=140, blank=True)),
('photo', self.gf('django.db.models.fields.files.ImageField')(max_length=100, null=True, blank=True)),
('accommodation', self.gf('django.db.models.fields.related.ForeignKey')(related_name='booking_accommodation', to=orm['Accommodations.Accommodation'])),
))
db.send_create_signal(u'Accommodations', ['AccommodationPhoto'])
# Adding model 'Booking'
db.create_table(u'Accommodations_booking', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('checkin_date', self.gf('django.db.models.fields.DateField')(default=datetime.datetime(2013, 12, 10, 0, 0))),
('checkout_date', self.gf('django.db.models.fields.DateField')(default=datetime.datetime(2013, 12, 11, 0, 0))),
('status', self.gf('django.db.models.fields.CharField')(default='WFA', max_length=3)),
('tenant', self.gf('django.db.models.fields.related.ForeignKey')(related_name='booking_tenant', to=orm['auth.User'])),
('accommodation', self.gf('django.db.models.fields.related.ForeignKey')(related_name='booking_of_accommodation', to=orm['Accommodations.Accommodation'])),
('price', self.gf('django.db.models.fields.FloatField')(default=0.0)),
))
db.send_create_signal(u'Accommodations', ['Booking'])
示例6: forwards
def forwards(self, orm):
# Adding model 'OrderPackageItem'
db.create_table('satchmo_ship_orderpackageitem', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('order', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shop.Order'])),
('order_item', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shop.OrderItem'], blank=True)),
('quantity', self.gf('django.db.models.fields.DecimalField')(max_digits=18, decimal_places=6)),
))
db.send_create_signal('satchmo_ship', ['OrderPackageItem'])
# Adding model 'OrderPackage'
db.create_table('satchmo_ship_orderpackage', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('order', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shop.Order'])),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2015, 7, 6, 0, 0), auto_now_add=True, blank=True)),
('ship_date', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2015, 7, 6, 0, 0), null=True, blank=True)),
('width', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=6, decimal_places=2, blank=True)),
('length', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=6, decimal_places=2, blank=True)),
('height', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=6, decimal_places=2, blank=True)),
('weight_units', self.gf('django.db.models.fields.CharField')(max_length=3, null=True, blank=True)),
('dimension_units', self.gf('django.db.models.fields.CharField')(max_length=3, null=True, blank=True)),
('tracking', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
('notes', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
))
db.send_create_signal('satchmo_ship', ['OrderPackage'])
# Adding M2M table for field order_package_items on 'OrderPackage'
m2m_table_name = db.shorten_name('satchmo_ship_orderpackage_order_package_items')
db.create_table(m2m_table_name, (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('orderpackage', models.ForeignKey(orm['satchmo_ship.orderpackage'], null=False)),
('orderpackageitem', models.ForeignKey(orm['satchmo_ship.orderpackageitem'], null=False))
))
db.create_unique(m2m_table_name, ['orderpackage_id', 'orderpackageitem_id'])
示例7: backwards
def backwards(self, orm):
# Deleting field 'ReadingDocuments.reading'
db.delete_column(u'wopa_submitter_readingdocuments', 'reading_id')
# Adding M2M table for field documents on 'Submission'
m2m_table_name = db.shorten_name(u'wopa_submitter_submission_documents')
db.create_table(m2m_table_name, (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('submission', models.ForeignKey(orm[u'wopa_submitter.submission'], null=False)),
('submissiondocuments', models.ForeignKey(orm[u'wopa_submitter.submissiondocuments'], null=False))
))
db.create_unique(m2m_table_name, ['submission_id', 'submissiondocuments_id'])
# Adding field 'Reading.file'
db.add_column(u'wopa_submitter_reading', 'file',
self.gf('django.db.models.fields.related.ForeignKey')(default=datetime.datetime(2014, 7, 21, 0, 0), to=orm['wopa_submitter.ReadingDocuments']),
keep_default=False)
# Deleting field 'SubmissionDocuments.submission'
db.delete_column(u'wopa_submitter_submissiondocuments', 'submission_id')
# Deleting field 'AssignmentDocuments.assignment'
db.delete_column(u'wopa_submitter_assignmentdocuments', 'assignment_id')
# Adding field 'Assignment.assignment_file'
db.add_column(u'wopa_submitter_assignment', 'assignment_file',
self.gf('django.db.models.fields.related.ForeignKey')(default=datetime.datetime(2014, 7, 21, 0, 0), to=orm['wopa_submitter.AssignmentDocuments']),
keep_default=False)
示例8: forwards
def forwards(self, orm):
# Adding field 'CodeToCompile.time_of_submission'
db.add_column(
u"onlinejudge_codetocompile",
"time_of_submission",
self.gf("django.db.models.fields.IntegerField")(null=True, blank=True),
keep_default=False,
)
# Adding field 'CodeToCompile.language'
db.add_column(
u"onlinejudge_codetocompile",
"language",
self.gf("django.db.models.fields.IntegerField")(default=1),
keep_default=False,
)
# Adding field 'Contest.time'
db.add_column(
u"onlinejudge_contest",
"time",
self.gf("django.db.models.fields.IntegerField")(default=datetime.datetime(2014, 3, 10, 0, 0)),
keep_default=False,
)
# Adding field 'Contest.start_time'
db.add_column(
u"onlinejudge_contest",
"start_time",
self.gf("django.db.models.fields.IntegerField")(default=datetime.datetime(2014, 3, 10, 0, 0)),
keep_default=False,
)
# Changing field 'Problem.statement'
db.alter_column(u"onlinejudge_problem", "statement", self.gf("ckeditor.fields.RichTextField")())
开发者ID:krishkoushik,项目名称:CVGWebsite,代码行数:35,代码来源:0006_auto__add_field_codetocompile_time_of_submission__add_field_codetocomp.py
示例9: forwards
def forwards(self, orm):
# Adding model 'ActualExpense'
db.create_table('converts_actualexpense', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='actual_expenses', to=orm['auth.User'])),
('size', self.gf('django.db.models.fields.DecimalField')(default=0, max_digits=20, decimal_places=2)),
('date', self.gf('django.db.models.fields.DateField')(default=datetime.datetime(2013, 11, 20, 0, 0))),
('description', self.gf('django.db.models.fields.CharField')(max_length=255)),
('regular_expense', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='actual_expenses', null=True, to=orm['converts.Expense'])),
))
db.send_create_signal('converts', ['ActualExpense'])
# Adding model 'Goal'
db.create_table('converts_goal', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='goals', to=orm['auth.User'])),
('name', self.gf('django.db.models.fields.CharField')(max_length=200)),
('price', self.gf('django.db.models.fields.DecimalField')(default=0, max_digits=20, decimal_places=2)),
('saved', self.gf('django.db.models.fields.DecimalField')(default=0, max_digits=20, decimal_places=2)),
('start_date', self.gf('django.db.models.fields.DateField')(default=datetime.datetime(2013, 11, 20, 0, 0))),
('end_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)),
('payment_size', self.gf('django.db.models.fields.DecimalField')(default=0, max_digits=20, decimal_places=2)),
('payment_periodicity', self.gf('django.db.models.fields.CharField')(default='f', max_length=50)),
))
db.send_create_signal('converts', ['Goal'])
# Changing field 'Expense.end_date'
db.alter_column('converts_expense', 'end_date', self.gf('django.db.models.fields.DateField')(null=True))
# Changing field 'Expense.start_date'
db.alter_column('converts_expense', 'start_date', self.gf('django.db.models.fields.DateField')())
开发者ID:obiwanus,项目名称:envelopes,代码行数:32,代码来源:0003_auto__add_actualexpense__add_goal__chg_field_expense_end_date__chg_fie.py
示例10: forwards
def forwards(self, orm):
# Deleting field 'PostComment.created'
db.delete_column(u'accounts_postcomment', 'created')
# Adding field 'PostComment.ts_created'
db.add_column(u'accounts_postcomment', 'ts_created',
self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 8, 19, 0, 0), auto_now_add=True, blank=True),
keep_default=False)
# Deleting field 'Post.created'
db.delete_column(u'accounts_post', 'created')
# Deleting field 'Post.changed'
db.delete_column(u'accounts_post', 'changed')
# Adding field 'Post.ts_created'
db.add_column(u'accounts_post', 'ts_created',
self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 8, 19, 0, 0), auto_now_add=True, blank=True),
keep_default=False)
# Adding field 'Post.ts_changed'
db.add_column(u'accounts_post', 'ts_changed',
self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 8, 19, 0, 0), auto_now=True, auto_now_add=True, blank=True),
keep_default=False)
# Adding field 'Post.ts_public'
db.add_column(u'accounts_post', 'ts_public',
self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 8, 19, 0, 0)),
keep_default=False)
# Adding field 'Post.is_public'
db.add_column(u'accounts_post', 'is_public',
self.gf('django.db.models.fields.BooleanField')(default=False),
keep_default=False)
开发者ID:SlavaAf,项目名称:partcom,代码行数:34,代码来源:0003_auto__del_field_postcomment_created__add_field_postcomment_ts_created_.py
示例11: forwards
def forwards(self, orm):
# Adding model 'TalePartComment'
db.create_table(u'Teller_talepartcomment', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('tale_part', self.gf('django.db.models.fields.related.ForeignKey')(related_name='comments', to=orm['Teller.TalePart'])),
('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='comments', to=orm['Teller.Profile'])),
('content', self.gf('ckeditor.fields.RichTextField')()),
('created_at', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2015, 3, 29, 0, 0), auto_now_add=True, blank=True)),
))
db.send_create_signal(u'Teller', ['TalePartComment'])
# Adding field 'TaleLinkPrecondition.created_at'
db.add_column(u'Teller_talelinkprecondition', 'created_at',
self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2015, 3, 29, 0, 0), auto_now_add=True, blank=True),
keep_default=False)
# Adding field 'TaleLinkConsequence.created_at'
db.add_column(u'Teller_talelinkconsequence', 'created_at',
self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2015, 3, 29, 0, 0), auto_now_add=True, blank=True),
keep_default=False)
# Adding field 'TaleLink.created_at'
db.add_column(u'Teller_talelink', 'created_at',
self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2015, 3, 29, 0, 0), auto_now_add=True, blank=True),
keep_default=False)
# Adding field 'TaleVariable.created_at'
db.add_column(u'Teller_talevariable', 'created_at',
self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2015, 3, 29, 0, 0), auto_now_add=True, blank=True),
keep_default=False)
开发者ID:berkersonmez,项目名称:TaleHouse,代码行数:30,代码来源:0018_auto__add_talepartcomment__add_field_talelinkprecondition_created_at__.py
示例12: forwards
def forwards(self, orm):
# Adding field 'Currency.is_active'
db.add_column(u'api_currency', 'is_active',
self.gf('django.db.models.fields.BooleanField')(default=True),
keep_default=False)
# Adding field 'Currency.last_modified'
db.add_column(u'api_currency', 'last_modified',
self.gf('django.db.models.fields.DateField')(default=datetime.datetime(2014, 3, 21, 0, 0), auto_now=True, blank=True),
keep_default=False)
# Adding field 'EntryType.last_modified'
db.add_column(u'api_entrytype', 'last_modified',
self.gf('django.db.models.fields.DateField')(default=datetime.datetime(2014, 3, 21, 0, 0), auto_now=True, blank=True),
keep_default=False)
# Adding field 'Budget.last_modified'
db.add_column(u'api_budget', 'last_modified',
self.gf('django.db.models.fields.DateField')(default=datetime.datetime(2014, 3, 21, 0, 0), auto_now=True, blank=True),
keep_default=False)
# Adding field 'Entry.last_modified'
db.add_column(u'api_entry', 'last_modified',
self.gf('django.db.models.fields.DateField')(default=datetime.datetime(2014, 3, 21, 0, 0), auto_now=True, blank=True),
keep_default=False)
开发者ID:perclasson,项目名称:epicbudget,代码行数:25,代码来源:0007_auto__add_field_currency_is_active__add_field_currency_last_modified__.py
示例13: forwards
def forwards(self, orm):
# Adding model 'Country'
db.create_table(u'discounts_country', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2016, 7, 23, 0, 0), auto_now_add=True, null=True, blank=True)),
('changed', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, null=True, blank=True)),
('code', self.gf('django.db.models.fields.CharField')(default='qwe', unique=True, max_length=3, db_index=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=80)),
))
db.send_create_signal(u'discounts', ['Country'])
# Adding model 'Company'
db.create_table(u'discounts_company', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2016, 7, 23, 0, 0), auto_now_add=True, null=True, blank=True)),
('changed', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, null=True, blank=True)),
('name', self.gf('django.db.models.fields.CharField')(max_length=80)),
('country', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['discounts.Country'])),
))
db.send_create_signal(u'discounts', ['Company'])
# Adding unique constraint on 'Company', fields ['name', 'country']
db.create_unique(u'discounts_company', ['name', 'country_id'])
# Adding model 'Negotiator'
db.create_table(u'discounts_negotiator', (
(u'user_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True, primary_key=True)),
('comment', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
))
db.send_create_signal(u'discounts', ['Negotiator'])
# Adding model 'Agreement'
db.create_table(u'discounts_agreement', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('date_start', self.gf('django.db.models.fields.DateField')()),
('date_end', self.gf('django.db.models.fields.DateField')()),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2016, 7, 23, 0, 0), auto_now_add=True, null=True, blank=True)),
('changed', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, null=True, blank=True)),
('company', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['discounts.Company'])),
('negotiator', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['discounts.Negotiator'])),
('export_turnover', self.gf('django.db.models.fields.FloatField')(default=0, blank=True)),
('import_turnover', self.gf('django.db.models.fields.FloatField')(default=0, blank=True)),
))
db.send_create_signal(u'discounts', ['Agreement'])
# Adding unique constraint on 'Agreement', fields ['company', 'date_start', 'date_end']
db.create_unique(u'discounts_agreement', ['company_id', 'date_start', 'date_end'])
# Adding model 'Period'
db.create_table(u'discounts_period', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('date_start', self.gf('django.db.models.fields.DateField')()),
('date_end', self.gf('django.db.models.fields.DateField')()),
('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2016, 7, 23, 0, 0), auto_now_add=True, null=True, blank=True)),
('changed', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, null=True, blank=True)),
('agreement', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['discounts.Agreement'])),
('status', self.gf('django.db.models.fields.PositiveSmallIntegerField')()),
('is_last', self.gf('django.db.models.fields.BooleanField')(default=False)),
))
db.send_create_signal(u'discounts', ['Period'])
示例14: forwards
def forwards(self, orm):
# Deleting field 'VCMBirthRecord.api_request_guid'
db.delete_column(u'source_data_vcmbirthrecord', 'api_request_guid')
# Adding field 'VCMBirthRecord.request_guid'
db.add_column(u'source_data_vcmbirthrecord', 'request_guid',
self.gf('django.db.models.fields.CharField')(default=1, max_length=255),
keep_default=False)
# Adding field 'VCMBirthRecord.date'
db.add_column(u'source_data_vcmbirthrecord', 'date',
self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 9, 5, 0, 0)),
keep_default=False)
# Adding field 'VCMSettlement.date'
db.add_column(u'source_data_vcmsettlement', 'date',
self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 9, 5, 0, 0)),
keep_default=False)
# Deleting field 'VCMSummaryNew.api_request_guid'
db.delete_column(u'source_data_vcmsummarynew', 'api_request_guid')
# Adding field 'VCMSummaryNew.request_guid'
db.add_column(u'source_data_vcmsummarynew', 'request_guid',
self.gf('django.db.models.fields.CharField')(default=1, max_length=255),
keep_default=False)
# Adding field 'VCMSummaryNew.created_at'
db.add_column(u'source_data_vcmsummarynew', 'created_at',
self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 9, 5, 0, 0)),
keep_default=False)
开发者ID:marks,项目名称:polio,代码行数:31,代码来源:0011_auto__del_field_vcmbirthrecord_api_request_guid__add_field_vcmbirthrec.py
示例15: forwards
def forwards(self, orm):
# Adding model 'Message'
db.create_table(u'mymessages_message', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('subject', self.gf('django.db.models.fields.CharField')(max_length=200)),
('message_type', self.gf('django.db.models.fields.CharField')(max_length=200)),
('body', self.gf('django.db.models.fields.TextField')()),
('start_on', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 9, 19, 0, 0))),
('expire_at', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 10, 3, 0, 0), null=True)),
('btn_text', self.gf('django.db.models.fields.CharField')(default='Okay', max_length=100)),
))
db.send_create_signal(u'mymessages', ['Message'])
# Adding M2M table for field group on 'Message'
m2m_table_name = db.shorten_name(u'mymessages_message_group')
db.create_table(m2m_table_name, (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('message', models.ForeignKey(orm[u'mymessages.message'], null=False)),
('group', models.ForeignKey(orm[u'auth.group'], null=False))
))
db.create_unique(m2m_table_name, ['message_id', 'group_id'])
# Adding model 'MessageInfo'
db.create_table(u'mymessages_messageinfo', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['myjobs.User'])),
('message', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['mymessages.Message'])),
('read', self.gf('django.db.models.fields.BooleanField')(default=False, db_index=True)),
('read_at', self.gf('django.db.models.fields.DateTimeField')(null=True)),
('expired', self.gf('django.db.models.fields.BooleanField')(default=False, db_index=True)),
('expired_on', self.gf('django.db.models.fields.DateTimeField')(null=True)),
))
db.send_create_signal(u'mymessages', ['MessageInfo'])