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