Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
cms/settings: remove unused wagtail settings
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzylogic2000 authored and Rineee committed Mar 31, 2020
1 parent 5fc9b87 commit c889ee2
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 47 deletions.
12 changes: 0 additions & 12 deletions apps/ideas/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@
ACCEPT_CONDITIONS_LABEL = _('I hereby agree to the {}terms'
' of use{} of the Civic'
' Europe idea challenge.')
CONFIRM_IDEA_CHALLENGE_CAMP_WITH_DATE = _('If selected, a representative of '
'my project will commit to joining '
'the Idea Challenge Camp '
'from {} to {}.')
CONFIRM_IDEA_CHALLENGE_CAMP_WITHOUT_DATE = _('If selected, a representative '
'of my project will commit '
'to joining the Idea Challenge '
'Camp at the end of April 2018.')

COWORKERS_TITLE = _('Please add your team members here.')
COWORKERS_HELP = _('Here you can insert the email addresses of '
Expand All @@ -45,10 +37,6 @@

COWORKERS_EDIT_TITLE = _('Your team members')

IDEA_CHALLENGE_CAMP_OPTION_LINK = _('More information about '
'the {}Idea Challenge Camp{}. '
'(max. 150 characters)')


class BaseForm(forms.ModelForm):
do_not_call_in_templates = True # important when reading section name
Expand Down
9 changes: 1 addition & 8 deletions cms/contrib/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from django.utils.translation import ugettext_lazy as _
from wagtail.core.models import Site

from cms.settings.models import CollaborationCampSettings, HelpPages
from cms.settings.models import HelpPages

LINK_TEXT = _('Please look {}here{} for more information.')

Expand All @@ -23,10 +23,3 @@ def add_link_to_helptext(help_text, help_page_name, link_text=None):
return '{} {}'.format(help_text, mark_safe(link_text))

return help_text


def get_idea_challenge_camp_settings():
site = Site.objects.filter(
is_default_site=True
).first()
return CollaborationCampSettings.for_site(site)
24 changes: 24 additions & 0 deletions cms/settings/migrations/0002_remove_unused_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 2.2.11 on 2020-03-31 07:21

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('cms_settings', '0001_initial'),
]

operations = [
migrations.RemoveField(
model_name='helppages',
name='annual_theme_help_page',
),
migrations.RemoveField(
model_name='helppages',
name='communication_camp_help_page',
),
migrations.DeleteModel(
name='CollaborationCampSettings',
),
]
27 changes: 0 additions & 27 deletions cms/settings/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,6 @@ class SocialMediaSettings(BaseSetting):

@register_setting
class HelpPages(BaseSetting):
communication_camp_help_page = models.ForeignKey(
'wagtailcore.Page',
related_name="help_page_communication_camp",
verbose_name='Idea Challenge Help Page',
null=True,
blank=True,
on_delete=models.SET_NULL,
help_text="Please add a link to the page that explains the idea challenge camp here.")
annual_theme_help_page = models.ForeignKey(
'wagtailcore.Page',
related_name="help_page_annual_theme",
null=True,
blank=True,
on_delete=models.SET_NULL,
help_text="Please add a link to the page that explains the annual theme, impact and implementation.")
terms_of_use_page = models.ForeignKey(
'wagtailcore.Page',
related_name="help_page_terms_of_use_page",
Expand All @@ -48,18 +33,6 @@ class HelpPages(BaseSetting):
help_text="Please add a link to the page that explains the selection criteria here.")

panels = [
PageChooserPanel('communication_camp_help_page'),
PageChooserPanel('annual_theme_help_page'),
PageChooserPanel('terms_of_use_page'),
PageChooserPanel('selection_criteria')
]


@register_setting
class CollaborationCampSettings(BaseSetting):
start_date = models.DateField(blank=True, null=True)
end_date = models.DateField(blank=True, null=True)
description = models.TextField(blank=True)

class Meta:
verbose_name = 'Idea Challenge Camp Settings'

0 comments on commit c889ee2

Please sign in to comment.