WIP
This commit is contained in:
@@ -15,8 +15,13 @@ class SupersetExerciseInline(admin.StackedInline):
|
|||||||
|
|
||||||
@admin.register(Superset)
|
@admin.register(Superset)
|
||||||
class SupersetAdmin(ImportExportModelAdmin):
|
class SupersetAdmin(ImportExportModelAdmin):
|
||||||
list_display = ("name", "workout", "order", "rounds",)
|
list_display = ("name", "workout", "order", "rounds", "get_workout_id",)
|
||||||
ordering = ("order",)
|
ordering = ("order",)
|
||||||
inlines = [
|
inlines = [
|
||||||
SupersetExerciseInline,
|
SupersetExerciseInline,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def get_workout_id(self, obj):
|
||||||
|
return obj.workout.id
|
||||||
|
get_workout_id.admin_order_field = 'workout_id' #Allows column order sorting
|
||||||
|
get_workout_id.short_description = 'Workout id' #Renames column head
|
||||||
Reference in New Issue
Block a user