Moved out custom settings areas
This commit is contained in:
parent
180c6b0f0b
commit
7f35cc41f5
4 changed files with 7 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
from .forms import *
|
||||
from .models import *
|
||||
from .snippets import *
|
||||
from .settings import *
|
||||
from .admin import *
|
||||
|
|
|
@ -7,6 +7,8 @@ from django.core.mail import send_mail
|
|||
|
||||
from wagtail.contrib.settings.models import BaseSetting, register_setting
|
||||
|
||||
# A simple feedback module built into the site admin
|
||||
|
||||
@register_setting
|
||||
class DataletsSettings(BaseSetting):
|
||||
feedback_question = models.TextField(
|
||||
|
@ -23,7 +25,7 @@ class DataletsSettings(BaseSetting):
|
|||
feedback_comment = models.TextField(
|
||||
help_text='Any general feedback', blank=True)
|
||||
class Meta:
|
||||
verbose_name = 'Datalets'
|
||||
verbose_name = 'Get support'
|
||||
|
||||
@receiver(pre_save, sender=DataletsSettings)
|
||||
def handle_save_settings(sender, instance, *args, **kwargs):
|
|
@ -230,6 +230,6 @@ class HomePage(Page):
|
|||
context['newsfeed'] = self.newsfeed
|
||||
return context
|
||||
|
||||
parent_page_types = []
|
||||
parent_page_types = ['wagtailcore.Page']
|
||||
class Meta:
|
||||
verbose_name = "Frontpage"
|
||||
|
|
|
@ -23,11 +23,13 @@ BASE_DIR = os.path.dirname(PROJECT_DIR)
|
|||
INSTALLED_APPS = [
|
||||
'publichealth.home',
|
||||
'publichealth.home.templatetags',
|
||||
'publichealth.feedler',
|
||||
'publichealth.search',
|
||||
|
||||
'wagtail.contrib.wagtailsearchpromotions',
|
||||
'wagtail.contrib.wagtailroutablepage',
|
||||
'wagtail.contrib.wagtailsitemaps',
|
||||
'wagtail.contrib.modeladmin',
|
||||
'wagtail.contrib.settings',
|
||||
'wagtail.wagtailforms',
|
||||
'wagtail.wagtailredirects',
|
||||
|
|
Loading…
Reference in a new issue