90 fields = '__all__'
91
92
93class AssignedSectionAttendanceSerializer(serializers.Serializer): 94
95 section = SectionAttendanceSerializer(many=True)
96 section_attendance = SectionAttendanceSerializer(many=True)
90 fields = '__all__'
91
92
93class AssignedSectionAttendanceSerializer(serializers.Serializer): 94
95 section = SectionAttendanceSerializer(many=True)
96 section_attendance = SectionAttendanceSerializer(many=True)
A method marked with @abstractmethod
is not defined in the concrete class. This can result in unintended behavior.
It is recommended to implement all abstract methods in the derived classes.
from abc import ABC, abstractmethod
class Vehicle(ABC):
@abstractmethod
def start():
pass
class Car(Vehicle):
# No overridden `start` method here. Can cause unintended behavior
def stop():
self.speed = 0
from abc import ABC, abstractmethod
class Vehicle(ABC):
@abstractmethod
def start():
pass
class Car(Vehicle):
def start():
self.speed = 3
def stop():
self.speed = 0