File tree Expand file tree Collapse file tree 1 file changed +0
-37
lines changed Expand file tree Collapse file tree 1 file changed +0
-37
lines changed Original file line number Diff line number Diff line change 1616from django .conf import settings
1717from django .core .cache import cache
1818from django .db .models import Q
19-
2019# Third Party
2120from rest_framework import serializers
2221
@@ -264,42 +263,6 @@ class Meta:
264263 ]
265264
266265
267- class TranslationSerializer (serializers .ModelSerializer ):
268- """
269- Translation serializer
270-
271- The fields from the new ExerciseBase are retrieved here as to retain
272- compatibility with the old model where all the fields where in Exercise.
273- """
274-
275- category = serializers .PrimaryKeyRelatedField (queryset = ExerciseCategory .objects .all ())
276- muscles = serializers .PrimaryKeyRelatedField (many = True , queryset = Muscle .objects .all ())
277- muscles_secondary = serializers .PrimaryKeyRelatedField (many = True , queryset = Muscle .objects .all ())
278- equipment = serializers .PrimaryKeyRelatedField (many = True , queryset = Equipment .objects .all ())
279- variations = serializers .PrimaryKeyRelatedField (many = True , queryset = Variation .objects .all ())
280- author_history = serializers .ListSerializer (child = serializers .CharField ())
281-
282- class Meta :
283- model = Translation
284- fields = (
285- 'id' ,
286- 'uuid' ,
287- 'name' ,
288- 'exercise' ,
289- 'description' ,
290- 'created' ,
291- 'category' ,
292- 'muscles' ,
293- 'muscles_secondary' ,
294- 'equipment' ,
295- 'language' ,
296- 'license' ,
297- 'license_author' ,
298- 'variations' ,
299- 'author_history' ,
300- )
301-
302-
303266class ExerciseTranslationBaseInfoSerializer (serializers .ModelSerializer ):
304267 """
305268 Exercise translation serializer for the base info endpoint
You can’t perform that action at this time.
0 commit comments