bia-fitness/lifting/admin.py

16 lines
401 B
Python
Raw Normal View History

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