Skip to content

Conversation

@rsk2
Copy link
Contributor

@rsk2 rsk2 commented Dec 9, 2022

@rsk2 rsk2 marked this pull request as draft December 15, 2022 16:24
@rsk2 rsk2 changed the title issue-294: Adding new date field to store publication date Issue-294 Dec 15, 2022
@rsk2 rsk2 changed the title Issue-294 For Issue-294 Dec 15, 2022
@fallen fallen changed the title For Issue-294 Show publication date on petition page Dec 16, 2022
@rsk2 rsk2 marked this pull request as ready for review December 17, 2022 07:56
Copy link
Member

@fallen fallen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!
It's good overall, a few fixes are needed as well as a rebase.
Thanks and sorry for taking long to review it!

<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" }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say this date format is specific to english speaking countries and others but do not work for France for instance.
I would say petition.publication_date|date:"SHORT_DATE_FORMAT" would be better, don't you think?

class Migration(migrations.Migration):

dependencies = [
('petition', '0016_signature_uses_phone_number_field'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now there is a migration 0017 (https://github.com/pytition/Pytition/blob/master/pytition/petition/migrations/0017_petitiontemplate_paper_signatures_enabled.py)
Could you "rebase" your PR so that your migrations depend on this one please?

@@ -0,0 +1,18 @@
# Generated by Django 2.2.28 on 2022-12-16 05:04
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This migration should now depend on 0018 and be renamed as 0019

<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" }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use text that can be translated via i18n :

{% trans "Published on: "%}

@rsk2
Copy link
Contributor Author

rsk2 commented Feb 15, 2023

Thanks @fallen! I've updated the PR

Copy link
Member

@fallen fallen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's all good!
Thanks a lot for the PR and sorry again for the latency in the review!

@fallen fallen merged commit 60e0f6a into pytition:master Feb 15, 2023
@fallen fallen linked an issue Apr 29, 2023 that may be closed by this pull request
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show petition creation date on petition page

2 participants