Last change
on this file since 300 was 291, checked in by Rick van der Zwet, 14 years ago |
Project import and intial application 'running' import, which combines django with protovis.
|
File size:
500 bytes
|
Line | |
---|
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 |
|
---|
7 | class UserAdmin(admin.ModelAdmin):
|
---|
8 | inlines = [ ResultInline, ]
|
---|
9 | class Media:
|
---|
10 | css = { "all" : ("css/hide_admin_original.css",) }
|
---|
11 | admin.site.register(User, UserAdmin)
|
---|
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.