-
-
Notifications
You must be signed in to change notification settings - Fork 34
Show publication date on petition page #299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
3e626a8
25a3146
769abce
b4fa2f4
2252ad1
3f72704
28121f5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Generated by Django 2.2.28 on 2022-12-09 11:34 | ||
|
|
||
| from django.db import migrations, models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('petition', '0016_signature_uses_phone_number_field'), | ||
|
||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AddField( | ||
| model_name='petition', | ||
| name='publication_date', | ||
| field=models.DateTimeField(blank=True, null=True), | ||
| ), | ||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Generated by Django 2.2.28 on 2022-12-16 05:04 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This migration should now depend on 0018 and be renamed as 0019 |
||
|
|
||
| from django.db import migrations, models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('petition', '0017_petition_publication_date'), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AddField( | ||
| model_name='petition', | ||
| name='show_publication_date', | ||
| field=models.BooleanField(default=False), | ||
| ), | ||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -330,6 +330,11 @@ <h2 class="text-danger">{% trans "This petition is moderated. You only see it be | |
| </div> | ||
| </div> | ||
| <div class="presentation"> | ||
| {% if petition.publication_date and petition.show_publication_date %} | ||
| <div class="font-weight-light font-italic"> | ||
| Published on: {{ petition.publication_date|date:"M d, Y" }} | ||
|
||
| </div> | ||
| {% endif %} | ||
| {{ petition.text|html_sanitize|safe }} | ||
| </div> | ||
| </div> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.