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

Added search bar in Django Admin Users and competitions pages as well as some filters #3544

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
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 Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM --platform=linux/amd64 python:3.8.3
RUN curl -sL https://deb.nodesource.com/setup_4.x | bash -
RUN apt-get update && apt-get install -y npm netcat nodejs python-dev libmemcached-dev

RUN pip install --upgrade pip # make things faster, hopefully
#RUN pip install --upgrade pip # make things faster, hopefully
COPY codalab/requirements/requirements.txt requirements.txt
RUN pip install -r requirements.txt

Expand Down
6 changes: 5 additions & 1 deletion codalab/apps/authenz/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@

from .models import ClUser

class UserAdmin(admin.ModelAdmin):
search_fields = ['username', 'email']
list_filter = ['is_staff', 'is_superuser']
list_display = ['username', 'email', 'is_staff', 'is_superuser']

admin.site.register(ClUser)
admin.site.register(ClUser, UserAdmin)
10 changes: 6 additions & 4 deletions codalab/apps/web/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ class ParticipantInlineAdmin(admin.TabularInline):
model = models.CompetitionParticipant

class CompetitionAdmin(admin.ModelAdmin):
inlines = [
PhaseInlineAdmin,
ParticipantInlineAdmin
]
#inlines = [
#PhaseInlineAdmin,
#ParticipantInlineAdmin
#]
search_fields = ['title', 'creator__username']
list_display = ['title', 'creator']
admin.site.register(models.Competition, CompetitionAdmin)


Expand Down
Loading