Hi!
Short answer: both.
Long answer: The process is the following…
I send an excel file to my api, and using pandas and openpyxl it reads some sheets, in the specific case this
some_stuff = {
'a_string': sheet['G1'].value,
'another_string': sheet['K1'].value,
'a_string_too': sheet['I1'].value,
'you_will_never_guess_what_i_am': sheet['J1'].value,
'date': sheet['H1'].value.strftime("%d.%m.%Y"),
}
i then pass this data to the serializer
class SomeStuffSerializer(serializers.ModelSerializer):
class Meta:
model = SomeStuff
fields = '__all__'
after validating this and others istances, i create a response like this
response = {
#some info
'another_date': datetime.datetime.today().strftime("%d%m.%Y"),
}
because this response will be used in a form to pre-compile some fields, based on some of the information extracted from the excel file.
Given that you ask for the serializers, i guess that the problem is in it?
Anyway thx for your time!