Added twitter, Facebook, google plus and email to social configuration model
This commit is contained in:
parent
0eadae992c
commit
0ceb680f5e
|
@ -0,0 +1,56 @@
|
|||
# -*- 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 'SocialConfiguration.facebook_url'
|
||||
db.add_column(u'config_socialconfiguration', 'facebook_url',
|
||||
self.gf('django.db.models.fields.URLField')(max_length=200, null=True, blank=True),
|
||||
keep_default=False)
|
||||
|
||||
# Adding field 'SocialConfiguration.google_plus_url'
|
||||
db.add_column(u'config_socialconfiguration', 'google_plus_url',
|
||||
self.gf('django.db.models.fields.URLField')(max_length=200, null=True, blank=True),
|
||||
keep_default=False)
|
||||
|
||||
# Adding field 'SocialConfiguration.contact_email'
|
||||
db.add_column(u'config_socialconfiguration', 'contact_email',
|
||||
self.gf('django.db.models.fields.EmailField')(max_length=75, null=True, blank=True),
|
||||
keep_default=False)
|
||||
|
||||
|
||||
def backwards(self, orm):
|
||||
# Deleting field 'SocialConfiguration.facebook_url'
|
||||
db.delete_column(u'config_socialconfiguration', 'facebook_url')
|
||||
|
||||
# Deleting field 'SocialConfiguration.google_plus_url'
|
||||
db.delete_column(u'config_socialconfiguration', 'google_plus_url')
|
||||
|
||||
# Deleting field 'SocialConfiguration.contact_email'
|
||||
db.delete_column(u'config_socialconfiguration', 'contact_email')
|
||||
|
||||
|
||||
models = {
|
||||
u'config.siteconfiguration': {
|
||||
'Meta': {'object_name': 'SiteConfiguration'},
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'maintenance_mode': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||
'site_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
|
||||
},
|
||||
u'config.socialconfiguration': {
|
||||
'Meta': {'object_name': 'SocialConfiguration'},
|
||||
'contact_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
|
||||
'facebook_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
|
||||
'google_analytics': ('django.db.models.fields.CharField', [], {'max_length': '16', 'null': 'True', 'blank': 'True'}),
|
||||
'google_plus_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'twitter_account': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'})
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['config']
|
|
@ -17,7 +17,15 @@ class SiteConfiguration(SingletonModel):
|
|||
|
||||
|
||||
class SocialConfiguration(SingletonModel):
|
||||
# Social accounts
|
||||
twitter_account = models.CharField(max_length=64, blank=True, null=True)
|
||||
facebook_url = models.URLField(blank=True, null=True)
|
||||
google_plus_url = models.URLField(blank=True, null=True)
|
||||
|
||||
# Contact
|
||||
contact_email = models.EmailField(blank=True, null=True)
|
||||
|
||||
# Analytics
|
||||
google_analytics = models.CharField(max_length=16, blank=True, null=True)
|
||||
|
||||
def __unicode__(self):
|
||||
|
|
Reference in New Issue