diff --git a/project/common/context.py b/project/common/context.py index 4c0ce42..4c135c4 100644 --- a/project/common/context.py +++ b/project/common/context.py @@ -1,5 +1,4 @@ from django.conf import settings -from .models import SocialMediaSettings SETTINGS_KEYS = [ @@ -18,7 +17,4 @@ def settings_injector(request): django_settings = {} for setting in SETTINGS_KEYS: django_settings[setting] = getattr(settings, setting) - django_settings.update({ - 'social': SocialMediaSettings.for_site(request.site) - }) return {'settings': django_settings} diff --git a/project/common/migrations/0001_initial.py b/project/common/migrations/0001_initial.py deleted file mode 100644 index f2fcfe0..0000000 --- a/project/common/migrations/0001_initial.py +++ /dev/null @@ -1,34 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10.4 on 2016-12-28 21:21 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('wagtailcore', '0032_add_bulk_delete_page_permission'), - ] - - operations = [ - migrations.CreateModel( - name='SocialMediaSettings', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('flickr', models.URLField(help_text='Flickr Profile URL')), - ('freenode', models.CharField(help_text='Freenode Username', max_length=15)), - ('github', models.URLField(help_text='GitHub Profile URL')), - ('reddit', models.URLField(help_text='Reddit Profile URL')), - ('twitter', models.CharField(help_text='Twitter Username', max_length=15)), - ('youtube', models.URLField(help_text='Youtube Channel URL')), - ('site', models.OneToOneField(editable=False, on_delete=django.db.models.deletion.CASCADE, to='wagtailcore.Site')), - ], - options={ - 'abstract': False, - }, - ), - ] diff --git a/project/common/migrations/__init__.py b/project/common/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/project/common/models.py b/project/common/models.py index d981feb..bdf14d0 100644 --- a/project/common/models.py +++ b/project/common/models.py @@ -4,7 +4,6 @@ from wagtail.wagtailadmin.edit_handlers import FieldPanel, MultiFieldPanel from wagtail.wagtailimages.edit_handlers import ImageChooserPanel from wagtailmetadata.models import MetadataPageMixin from bs4 import BeautifulSoup -from wagtail.contrib.settings.models import BaseSetting, register_setting class Entity(MetadataPageMixin, Page): @@ -38,13 +37,3 @@ class Entity(MetadataPageMixin, Page): class Meta: abstract = True - - -@register_setting -class SocialMediaSettings(BaseSetting): - flickr = models.URLField(help_text="Flickr Profile URL") - freenode = models.CharField(help_text="Freenode Username", max_length=15) - github = models.URLField(help_text="GitHub Profile URL") - reddit = models.URLField(help_text="Reddit Profile URL") - twitter = models.CharField(help_text='Twitter Username', max_length=15) - youtube = models.URLField(help_text='Youtube Channel URL') diff --git a/templates/common/footer.html b/templates/common/footer.html index 3e553ec..eefa38d 100644 --- a/templates/common/footer.html +++ b/templates/common/footer.html @@ -3,6 +3,11 @@