diff --git a/docs/settings.rst b/docs/settings.rst index 57159060..6ae1ce6a 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -128,6 +128,12 @@ Wafer's settings When ``True``, users can register for the conference. (Note, this is not the same as signing up for an account on the website.) +``WAFER_SCHEDULE_MAX_AUTHORS`` + A number. + This is the maximum list of people to be listed as talk authors in the + schedule. If the number of talk authors is higher than this, then they get + displayed as "First Author, et al." + ``WAFER_SSO`` A list of SSO mechanisms in use. Possible options are: ``'github'``, ``'gitlab'``. diff --git a/wafer/settings.py b/wafer/settings.py index 0a0b5982..3127efa0 100644 --- a/wafer/settings.py +++ b/wafer/settings.py @@ -362,3 +362,7 @@ # Hide the schedule from users without permission to edit it WAFER_HIDE_SCHEDULE = False + +# Number of talk authors to list explicitly, before listing them as "First +# Author, et al." +WAFER_SCHEDULE_MAX_AUTHORS = 2 diff --git a/wafer/talks/models.py b/wafer/talks/models.py index 235f19c8..49e1e19d 100644 --- a/wafer/talks/models.py +++ b/wafer/talks/models.py @@ -283,7 +283,7 @@ def get_authors_display_name(self): key=lambda author: u'' if author == self.corresponding_author else author.userprofile.display_name()) names = [author.userprofile.display_name() for author in authors] - if len(names) <= 2: + if len(names) <= settings.WAFER_SCHEDULE_MAX_AUTHORS: return u' & '.join(names) return _(u'%s, et al.') % names[0]