You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
614 B
23 lines
614 B
from django.contrib import admin |
|
from .models import Course, Arrivee, Coureur |
|
|
|
|
|
@admin.register(Course) |
|
class CourseAdmin(admin.ModelAdmin): |
|
list_display = ('nom', 'date', 'depart', 'fin') |
|
search_fields = ('nom',) |
|
list_filter = ('date',) |
|
|
|
|
|
@admin.register(Arrivee) |
|
class ArriveeAdmin(admin.ModelAdmin): |
|
list_display = ('course', 'coureur', 'temps', 'rang', 'date_arrivee') |
|
search_fields = ('course__nom', 'coureur__nom') |
|
list_filter = ('course',) |
|
|
|
|
|
@admin.register(Coureur) |
|
class CoureurAdmin(admin.ModelAdmin): |
|
list_display = ('nom', 'classe') |
|
search_fields = ('nom', 'classe') |
|
list_filter = ('classe',)
|
|
|