From 825a0111b46aa9973f826e4cfc0078199d74f4f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89lie=20Bouttier?= Date: Sat, 25 Nov 2017 23:19:24 +0100 Subject: [PATCH] homepage markdown preview --- cfp/forms.py | 8 +++- cfp/templates/cfp/admin/base.html | 3 +- cfp/templates/cfp/admin/homepage.html | 54 +++++++++++++++++++++++++++ cfp/urls.py | 4 +- cfp/views.py | 19 +++++++--- ponyconf/urls.py | 3 ++ ponyconf/views.py | 12 ++++++ 7 files changed, 94 insertions(+), 9 deletions(-) create mode 100644 cfp/templates/cfp/admin/homepage.html create mode 100644 ponyconf/views.py diff --git a/cfp/forms.py b/cfp/forms.py index 1ca5173..d7488a8 100644 --- a/cfp/forms.py +++ b/cfp/forms.py @@ -259,7 +259,7 @@ class ConferenceForm(forms.ModelForm): class Meta: model = Conference fields = [ - 'name', 'home', 'venue', 'city', 'contact_email', 'schedule_publishing_date', 'schedule_redirection_url', + 'name', 'venue', 'city', 'contact_email', 'schedule_publishing_date', 'schedule_redirection_url', 'volunteers_opening_date', 'volunteers_closing_date', 'reply_email', 'secure_domain', 'staff', ] widgets = { @@ -270,6 +270,12 @@ class ConferenceForm(forms.ModelForm): } +class HomepageForm(forms.ModelForm): + class Meta: + model = Conference + fields = ['home'] + + class CreateUserForm(forms.ModelForm): class Meta: model = User diff --git a/cfp/templates/cfp/admin/base.html b/cfp/templates/cfp/admin/base.html index fd40826..699c4de 100644 --- a/cfp/templates/cfp/admin/base.html +++ b/cfp/templates/cfp/admin/base.html @@ -7,7 +7,8 @@ {{ block.super }}