mirror of
https://github.com/workhardbekind/workout-challenge.git
synced 2026-07-04 01:13:32 -04:00
28 lines
No EOL
547 B
Python
28 lines
No EOL
547 B
Python
from django.contrib import admin
|
|
|
|
from .models import Workout
|
|
from competition.models import Points
|
|
|
|
# Register your models here.
|
|
class PointsInline(admin.TabularInline):
|
|
"""Table of Competition categories"""
|
|
|
|
model = Points
|
|
fk_name = "workout"
|
|
can_delete = False
|
|
extra = 0
|
|
|
|
@admin.register(Workout)
|
|
class WorkoutAdmin(admin.ModelAdmin):
|
|
"""Admin view of Workout"""
|
|
|
|
list_display = [
|
|
"user",
|
|
"sport_type",
|
|
"start_datetime",
|
|
"strava_id",
|
|
]
|
|
|
|
inlines = [
|
|
PointsInline,
|
|
] |