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

Use consistent capitals for admin column descriptions #2282

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion judge/admin/comments.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def unhide_comment(self, request, queryset):
'%d comments successfully unhidden.',
count) % count)

@admin.display(description=_('Associated page'), ordering='page')
@admin.display(description=_('associated page'), ordering='page')
def linked_page(self, obj):
link = obj.link
if link is not None:
Expand Down
2 changes: 1 addition & 1 deletion judge/admin/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def get_readonly_fields(self, request, obj=None):
fields += ('description',)
return fields

@admin.display(description=_('Authors'))
@admin.display(description=_('authors'))
def show_authors(self, obj):
return ', '.join(map(attrgetter('user.username'), obj.authors.all()))

Expand Down
6 changes: 3 additions & 3 deletions judge/admin/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ def show_public(self, obj):
return format_html('<a href="{0}" style="white-space:nowrap;">{1}</a>',
obj.get_absolute_url(), gettext('View on site'))

@admin.display(description=_('User'), ordering='user__username')
@admin.display(description=_('user'), ordering='user__username')
def admin_user_admin(self, obj):
return obj.username

@admin.display(description=_('Email'), ordering='user__email')
@admin.display(description=_('email'), ordering='user__email')
def email(self, obj):
return obj.user.email

@admin.display(description=_('Timezone'), ordering='timezone')
@admin.display(description=_('timezone'), ordering='timezone')
def timezone_full(self, obj):
return obj.timezone

Expand Down
12 changes: 6 additions & 6 deletions judge/admin/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,23 +207,23 @@ def recalculate_score(self, request, queryset):
'%d submissions were successfully rescored.',
len(submissions)) % len(submissions))

@admin.display(description=_('Problem code'), ordering='problem__code')
@admin.display(description=_('problem code'), ordering='problem__code')
def problem_code(self, obj):
return obj.problem.code

@admin.display(description=_('Problem name'), ordering='problem__name')
@admin.display(description=_('problem name'), ordering='problem__name')
def problem_name(self, obj):
return obj.problem.name

@admin.display(description=_('User'), ordering='user__user__username')
@admin.display(description=_('user'), ordering='user__user__username')
def user_column(self, obj):
return obj.user.user.username

@admin.display(description=_('Time'), ordering='time')
@admin.display(description=_('time'), ordering='time')
def execution_time(self, obj):
return round(obj.time, 2) if obj.time is not None else 'None'

@admin.display(description=_('Memory'), ordering='memory')
@admin.display(description=_('memory'), ordering='memory')
def pretty_memory(self, obj):
memory = obj.memory
if memory is None:
Expand All @@ -233,7 +233,7 @@ def pretty_memory(self, obj):
else:
return gettext('%.2f MB') % (memory / 1024)

@admin.display(description=_('Language'), ordering='language__name')
@admin.display(description=_('language'), ordering='language__name')
def language_column(self, obj):
return obj.language.name

Expand Down
Loading