SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 5af286ab authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Improve SPB campaign

parent f84c7c13
No related branches found
No related tags found
No related merge requests found
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-10-05 10:53
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('petitions', '0003_auto_20171004_2139'),
]
operations = [
migrations.AddField(
model_name='petition',
name='preamble',
field=models.TextField(blank=True, null=True),
),
]
......@@ -13,6 +13,7 @@ class Petition(models.Model):
title = models.CharField(max_length=256)
slug = models.SlugField()
headline = models.CharField(max_length=256)
preamble = models.TextField(blank=True, null=True)
statement = models.TextField()
creator = models.ForeignKey(User, on_delete=models.CASCADE)
created = models.DateTimeField(auto_now_add=True)
......
......@@ -9,7 +9,12 @@
<div class="row">
<div class="col-12">
<h1 class="highlight">{{ petition.headline }}</h1>
<p>{{ petition.statement|linebreaksbr }}</p>
{% if petition.preamble %}
<h3>Preamble:</h3>
<p>{{ petition.preamble|linebreaksbr }}</p>
{% endif %}
<h3>Petition statement:</h3>
<p>{{ petition.statement|linebreaksbr }}</p>
{% if not is_signed %}
<h3>Please consider signing this petition</h3>
<form action="{{ petition.get_absolute_url }}" method="post">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment