bia-fitness/lifting/admin.py

11 lines
303 B
Python
Raw Normal View History

2015-03-31 21:25:19 +00:00
from django.contrib import admin
2015-04-10 18:19:12 +00:00
from .models import Set
2015-04-02 22:24:34 +00:00
@admin.register(Set)
class SetAdmin(admin.ModelAdmin):
date_hierarchy = 'date'
2015-04-10 18:19:12 +00:00
readonly_fields = ('user', 'lift', 'date')
list_filter = ('user__username', 'lift')
fields = ('user', 'lift', 'date', 'weight_kg', 'reps', 'source')