added event filter for teams in admin panel
This commit is contained in:
parent
fb0d844781
commit
1258096220
|
@ -1,9 +1,6 @@
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from .models import Event, EventPlayer, Team
|
from .models import Event, EventPlayer, Team
|
||||||
|
|
||||||
#admin.site.register(Event)
|
|
||||||
#admin.site.register(Scores)
|
|
||||||
|
|
||||||
@admin.register(Event)
|
@admin.register(Event)
|
||||||
class event(admin.ModelAdmin):
|
class event(admin.ModelAdmin):
|
||||||
#list display
|
#list display
|
||||||
|
@ -27,15 +24,6 @@ class team(admin.ModelAdmin):
|
||||||
#list display
|
#list display
|
||||||
list_display = ['name', 'password']
|
list_display = ['name', 'password']
|
||||||
#list Filter
|
#list Filter
|
||||||
# list_filter = ('event',)
|
list_filter = ('event',)
|
||||||
# search list
|
# search list
|
||||||
search_fields = ['name']
|
search_fields = ['name']
|
||||||
|
|
||||||
# @admin.register(EventPlayer)
|
|
||||||
# class eventplayer(admin.ModelAdmin):
|
|
||||||
# #list display
|
|
||||||
# list_display = ['user', 'event', 'team']
|
|
||||||
# #list Filter
|
|
||||||
# list_filter = ('event', 'team__name')
|
|
||||||
# # search list
|
|
||||||
# search_fields = ['user__username', 'event__name']
|
|
Loading…
Reference in New Issue