Hi Everybody,
I try to use the serializer to save an image in my model as following:
def save_file(file,owner):
data ={}
pic = None
myfile = file
is_image(myfile)
data['image'] = file
data['owner'] = owner
s = ImageSerializer(data=data)
if s.is_valid():
logg
I have found the solution (even if i dont understand why)
it is not an issue due to pillow but the file itself.
if my function is like
is_image(myfile):
myfile.read()
I will have the same issue.
The file pointer/cursor needs to be reseted to the first position with
myfile.seek(0)
it seems li
Hello sir. I started learning django. I want to be a backend web developer.
It is good to see you
On Mon, 7 Dec 2020, 18:49 cyril moreau, wrote:
> I have found the solution (even if i dont understand why)
> it is not an issue due to pillow but the file itself.
> if my function is like
> is_image
Hello, i'm wasting many hours to understand how to generate good swagger-ui
documentation with query parameters from function Based View in DRF 3.5.
OpenApi Schema is done, Sqwagger-UI is done, Redoc too but get parameters
aren't displayed from the ui.
I don't undertsand how to edit schema o s
I have a piece of code like below which is truncated for concise:
bargained_count =
BargainLog.objects.filter(bargain_start_log=bargain_start_log).count() ...
money = calc_single_bargain_money( bargained_count=bargained_count, ..
) ... BargainLog.objects.create(bargain_start_log=bargain_st
I have a piece of code like below which is truncated for concise:
bargained_count =
BargainLog.objects.filter(bargain_start_log=bargain_start_log).count()
...
money = calc_single_bargain_money( bargained_count=bargained_count, ..
)
...
BargainLog.objects.create(bargain_start_log=b