source: django_apps/running/admin.py@ 360

Last change on this file since 360 was 301, checked in by Rick van der Zwet, 14 years ago
  • Login/logout
  • Revised admin form admin form
File size: 521 bytes
RevLine 
[291]1from running.models import *
2from django.contrib import admin
3class ResultInline(admin.TabularInline):
4 model = Result
5 fields = [ 'date', 'distance', 'time' ]
6
[301]7class RunningUserAdmin(admin.ModelAdmin):
[291]8 inlines = [ ResultInline, ]
9 class Media:
10 css = { "all" : ("css/hide_admin_original.css",) }
[301]11admin.site.register(RunningUser, RunningUserAdmin)
[291]12
13
14class ResultAdmin(admin.ModelAdmin):
15 list_display = [ 'user', 'distance' ,'time' , 'date' ]
16 list_filter = [ 'user' ]
17admin.site.register(Result, ResultAdmin)
18
Note: See TracBrowser for help on using the repository browser.