-
Notifications
You must be signed in to change notification settings - Fork 11
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
projects: CSV export for projects #553
Conversation
""" | ||
text = external_partner['searcherName'] | ||
if external_partner.get('institution'): | ||
text = text + f' ({external_partner["institution"]})' |
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.
text = ' '.join([text, external_partner["institution"]])
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.
text = ' '.join([text, external_partner["institution"]])
Or:
text = f'{text} ({external_partner["institution"]})'
text = actor['choice'] if actor['choice'] != 'Other' else actor[ | ||
'other'] | ||
if actor.get('count'): | ||
text = text + f' ({actor["count"]})' |
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.
same here
""" | ||
text = external_partner['searcherName'] | ||
if external_partner.get('institution'): | ||
text = text + f' ({external_partner["institution"]})' |
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.
text = ' '.join([text, external_partner["institution"]])
Or:
text = f'{text} ({external_partner["institution"]})'
text = text + f' ({actor["count"]})' | ||
return text | ||
|
||
if data.get('innerSearcher'): |
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.
You can use a for loop for the next 3 if
.
* Configures a response handler to export projects record in CSV format. * Sets the accept mimetype in the `before_request` hook if a `format` argument is present in request. * Adds a CSV serializer to process records and format them in CSV row. * Adds the possibility to override the record resource configuration with a dedicated organisation configuration. * Adds a new stream response, to process a generator and customizes the attachment filename. * Adds manual translations to translate CSV header. * Closes #456. Co-Authored-by: Sébastien Délèze <[email protected]>
before_request
hook if aformat
argument is present in request.Co-Authored-by: Sébastien Délèze [email protected]