mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-29 17:36:49 +01:00
Added author_name and provider_name fields to Embed model
This commit is contained in:
parent
cfcc67f514
commit
a771e6adc4
@ -0,0 +1,48 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from south.utils import datetime_utils as datetime
|
||||
from south.db import db
|
||||
from south.v2 import SchemaMigration
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Migration(SchemaMigration):
|
||||
|
||||
def forwards(self, orm):
|
||||
# Adding field 'Embed.author_name'
|
||||
db.add_column(u'wagtailembeds_embed', 'author_name',
|
||||
self.gf('django.db.models.fields.TextField')(default='', blank=True),
|
||||
keep_default=False)
|
||||
|
||||
# Adding field 'Embed.provider_name'
|
||||
db.add_column(u'wagtailembeds_embed', 'provider_name',
|
||||
self.gf('django.db.models.fields.TextField')(default='', blank=True),
|
||||
keep_default=False)
|
||||
|
||||
|
||||
def backwards(self, orm):
|
||||
# Deleting field 'Embed.author_name'
|
||||
db.delete_column(u'wagtailembeds_embed', 'author_name')
|
||||
|
||||
# Deleting field 'Embed.provider_name'
|
||||
db.delete_column(u'wagtailembeds_embed', 'provider_name')
|
||||
|
||||
|
||||
models = {
|
||||
u'wagtailembeds.embed': {
|
||||
'Meta': {'unique_together': "(('url', 'max_width'),)", 'object_name': 'Embed'},
|
||||
'author_name': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'height': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
|
||||
'html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'last_updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
|
||||
'max_width': ('django.db.models.fields.SmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
|
||||
'provider_name': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'thumbnail_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
|
||||
'title': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'type': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
|
||||
'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
|
||||
'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['wagtailembeds']
|
@ -15,6 +15,8 @@ class Embed(models.Model):
|
||||
type = models.CharField(max_length=10, choices=EMBED_TYPES)
|
||||
html = models.TextField(blank=True)
|
||||
title = models.TextField(blank=True)
|
||||
author_name = models.TextField(blank=True)
|
||||
provider_name = models.TextField(blank=True)
|
||||
thumbnail_url = models.URLField(null=True, blank=True)
|
||||
width = models.IntegerField(null=True, blank=True)
|
||||
height = models.IntegerField(null=True, blank=True)
|
||||
|
Loading…
Reference in New Issue
Block a user