Skip to content

Commit

Permalink
Use consistent capitals for admin column descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
int-y1 authored and Ninjaclasher committed Oct 11, 2023
1 parent 98c7557 commit d6dd630
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
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

0 comments on commit d6dd630

Please sign in to comment.