3fefc550fe
- Django backend with DRF (clubs, wrestlers, trainers, exercises, templates, trainings, homework, locations, leistungstest) - Next.js 16 frontend with React, Shadcn UI, Tailwind - JWT authentication - Full CRUD for all entities - Calendar view for trainings - Homework management system - Leistungstest tracking
12 lines
325 B
Python
12 lines
325 B
Python
from rest_framework import serializers
|
|
from .models import Trainer
|
|
|
|
|
|
class TrainerSerializer(serializers.ModelSerializer):
|
|
club_name = serializers.CharField(source='club.name', read_only=True)
|
|
|
|
class Meta:
|
|
model = Trainer
|
|
fields = '__all__'
|
|
read_only_fields = ['created_at', 'updated_at']
|