Skip to content
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

Add collection_date to export file name #56

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

luelista
Copy link
Contributor

No description provided.

Base automatically changed from ux-improvements to master January 21, 2025 13:58
@@ -177,6 +178,7 @@ def post(self, request, *args, **kwargs):
else:
exp = SepaExport(organizer=request.organizer, xmldata="")
exp.testmode = False
if type(key) is tuple: exp.collection_date = key[1]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if type(key) is tuple: exp.collection_date = key[1]
if isinstance(key, tuple):
exp.collection_date = key[1]

(
self.request.event.slug.upper()
if hasattr(self.request, "event")
else self.request.organizer.slug.upper()
),
self.object.datetime.strftime("%Y-%m-%d-%H-%M-%S"),
self.object.collection_date and self.object.collection_date.strftime("--%Y-%m-%d"),
Copy link
Member

Choose a reason for hiding this comment

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

False looks a little weird in a filename?

@@ -83,6 +84,9 @@ <h2>{% trans "Exported XML files" %}</h2>
<span class="label label-warning">{% trans "TEST MODE" %}</span>
{% endif %}
</td>
<td>
{{ export.collection_date|date:"SHORT_DATE_FORMAT" }}
Copy link
Member

Choose a reason for hiding this comment

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

Don't you think this will be confusing with an empty column for files containing multiple collection dates (mode = mix)?

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.

2 participants