Skip to content

Commit

Permalink
Display editor's email address in project submission history.
Browse files Browse the repository at this point in the history
  • Loading branch information
tompollard committed Jan 11, 2024
1 parent cb94f4a commit df16e53
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions physionet-django/physionet/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,3 +640,6 @@ class StorageTypes:
# Django configuration for file upload (see https://docs.djangoproject.com/en/4.2/ref/settings/)
DATA_UPLOAD_MAX_NUMBER_FILES = config('DATA_UPLOAD_MAX_NUMBER_FILES', cast=int, default=1000)
DATA_UPLOAD_MAX_MEMORY_SIZE = config('DATA_UPLOAD_MAX_MEMORY_SIZE', cast=int, default=2621440)

# Emails
PROJECT_EDITOR_EMAIL = config('PROJECT_EDITOR_EMAIL', default='')
8 changes: 7 additions & 1 deletion physionet-django/project/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1388,6 +1388,12 @@ def project_submission(request, project_slug, **kwargs):
else:
edit_logs, copyedit_logs = None, None

if settings.PROJECT_EDITOR_EMAIL:
contact_email = settings.PROJECT_EDITOR_EMAIL.replace('PROJECT-SLUG',
project.slug)
else:
contact_email = project.editor.email

return render(
request,
"project/project_submission.html",
Expand All @@ -1399,7 +1405,7 @@ def project_submission(request, project_slug, **kwargs):
"edit_logs": edit_logs,
"copyedit_logs": copyedit_logs,
"awaiting_user_approval": awaiting_user_approval,
"contact_email": settings.CONTACT_EMAIL,
"contact_email": contact_email,
},
)

Expand Down

0 comments on commit df16e53

Please sign in to comment.