18 lines
433 B
Python
18 lines
433 B
Python
# -*- coding: utf-8 -*-
|
|
# @Time : 2021/9/15 22:36
|
|
# @Author : Flora.Chen
|
|
# @File : mixins.py
|
|
# @Software: PyCharm
|
|
# @Desc:
|
|
import logging
|
|
|
|
logger = logging.debug("test")
|
|
|
|
|
|
class GetDataMinxin:
|
|
def get_data_by_ation(self, request, *args, **kwargs):
|
|
response = self.retrieve(request, *args, **kwargs)
|
|
response.data = response.data.get(self.action)
|
|
logger.error(response.data)
|
|
return response
|