D
Size: a a a
D
С
m
D
W
С
С
DT
D
С
D
W
С
D
D
DT
W
from atlas_utils.common.http_tools import api_call
class RegistrationPhone(views.View):
@method_decorator(api_call(method="PhoneForShortCode->POST"), name="dispatch")
data_in_object = ApiDtoFactory.short_code_of_phone(item=request.JSON)
return magick_method(data_in_object)
Еще один файл
from atlas_utils.common.dto import ItemDtoFactory
class ApiDtoFactory(ItemDtoFactory):
@classmethod
def short_code_of_phone(cls, item: QueryDict) -> PhoneForShortCode:
return PhoneForShortCode(
phone=item.get('phone')
)
Другой файл
from atlas_utils.common.dto import ItemDto
@dataclass
class PhoneForShortCode(ItemDto):
phone: str
W
D
С