mirror of
https://github.com/workhardbekind/workout-challenge.git
synced 2026-07-04 09:23:32 -04:00
first commit
This commit is contained in:
commit
e7f627801f
152 changed files with 35352 additions and 0 deletions
28
src-backend/workouts/admin.py
Normal file
28
src-backend/workouts/admin.py
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
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,
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue