-
Notifications
You must be signed in to change notification settings - Fork 7
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
base: master
Are you sure you want to change the base?
Conversation
@@ -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] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"), |
There was a problem hiding this comment.
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" }} |
There was a problem hiding this comment.
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)?
No description provided.