Luis
Hello, anyone knows how to use speech-to-text in django?
I think that browsers should take care of that... Django is a backend framework.
Ujjwal
Hello everyone . I want to return image as a response from get request . But in the response side I am seeing it is giving me a string instead of image ?
John
Guys can anyone mention how to work with autocomplete in Django rest framework using elastic search
John
Thanks in advance
π
hey anyone up?
π
I have a chat exported in file.txt I'm turning this into csv file by pandas and plotting some graphs with that csv file Someone tell me how do I start implementing this in django
π
I want to put this in basic web page please anyone have any idea please help
Kushal
I tried to make a video and sound recording project. I didn't get proper idea. Guide me for the project. It might be paid too.
π
I have seen many django videos but they only show page rendering formmating other easy stuffs
mukul
Error : The truth value of dataframe is ambiguous Occur while sending the pandas dataframe to html
Onks
is autocomplete not a trivial to implement in django? Everything else went so smoothly, im pretty stuck at providing autocomplete for my form :S
Zoro
hello guys. sup. im a fellow django and python developer. hope to have a good time with you all
John
Anyone please mention how to do an autocomplete in DRF using elastic search
Anonymous
how can i filter by group name??
Anonymous
tel me plz urgent
Mirco
how can i filter by group name??
Which group do you mean ? Do you have created a custom one ?
Anonymous
in admin panel i have created groups
👍
Hello, guys I have been trying to implement Bitbucket CI/CD with mysql & Django since last week. But I'm getting error: Got an error creating the test database: (1044, "Access denied for user '$MYSQL_USER'@'%' to database 'test_$DB_NAME'") I have already set environment variable too.
Mirco
in admin panel i have created groups
So you wanna filter your users by that group ?
Anonymous
yeah right
Mirco
yeah right
Are you using Django Rest Framework ? Do you have an APIView ?
Mirco
im using viewset
Ok so when you pass the attribute queryset Just use the ORM filter to filter by that group name
Anonymous
can you write an example?
Mirco
can you write an example?
queryset = User.objects.filter(groups__name='foo')
Doragonsureiyā
thank you it worked☺️
You're welcome! 😊
Njain
Hey gyus please tell me Is there any way in django to store user entered data by same name to store all values in datahase
𝕯aniel
Guys how i can do ajax load more button. I use infinite scroll but it's not working for me. Only scrolling, but i need load more button
𝕯aniel
Can i use any easy library for project? I need just load posts with ajax via button
Ujjwal
I have tried sending image as a response by converting image to image string base 64 and in templates I use img tag so I got the image . But now when I am using django rest api , I want the image to show in get request . For that I decode base 64 to image file (jpg) and I tried to send image as a response thru django rest framework . It is showing jpeg image file not JSON serialisable ? What should I get image as a response under get rquest
Ujjwal
you need to use base64 to send images as strings
Yes I did that only when rendering to templates . But now it's about using api . I want image from api under get request
Mirco
Yes I did that only when rendering to templates . But now it's about using api . I want image from api under get request
you cannot serialise jpg file, you need to keep using base64 inside the json response
Mirco
or show the MEDIA link to it
Ujjwal
you cannot serialise jpg file, you need to keep using base64 inside the json response
Ok so I convert image to base64 Then how will the image appear as a response ?
Mirco
Ok so I convert image to base64 Then how will the image appear as a response ?
it's simpler if you just return the media link and put that inside an img inside the template
Ujjwal
it's simpler if you just return the media link and put that inside an img inside the template
I am not using any template . I have to make an api that returns image as response
Mirco
I am not using any template . I have to make an api that returns image as response
Yup but whatever client you will use, it can get easily the media link to show the image
Ujjwal
Yup but whatever client you will use, it can get easily the media link to show the image
Actually I am in backend team . I am told to return image as response from api
Mirco
Actually I am in backend team . I am told to return image as response from api
Why don't you read what I'm telling u ? Return the image link for the GET request You won't have any serializer error and your clients can easily get the image
Shourya
Actually I am in backend team . I am told to return image as response from api
You can return the image by converting it to bs64 encoding and passing this into the api response
Mirco
And clients will have to decode it
Ujjwal
Ok
Gk
I have created a form and in that form I have field phone number on submit I want to generate otp on that particular phone number I tried google but all I got is registration and login which I don’t want I just want to get form data move into table Can you give any reference, it will be great help Thanks in advance
Gk
After opt is confirmed?
Gk
Anyone ??
Doragonsureiyā
Anyone ??
Maybe anyone is here, yes, but they are not obliged to read everyone's message here neither to reply to everyone's message, if someone wants to reply to your message, they will do that, just don't try to draw attention to your message writing "anyone?" every 5 minutes, that will lead you to be warned for SPAM/Flood, just be patient or use Google/DuckDuckGo to research about your question instead of wasting time here waiting for people to do your work. Have a nice day 😊
Gk
Ok
Cynthia
Hey people I need some help with django
Cynthia
Assume we have products in the store. we have like 15 available products in the store and client orders 5 we remain with 10 available later he changes his mind to 7 so I was thinking I update the order by adding the previous number to the remaining product so that I get fifteen then minus the current order from product then i get 8 help if you I will appericate
Cynthia
def orderupdate(request, pk): obj = Order.objects.get(id = pk) # productid = obj.product.id # obj1= Product.objects.get(id = productid) form = OrderForm(request.POST or None, instance= obj) if form.is_valid(): # obj1.quantity += obj.quantity # obj1.save() # print('this is before update', obj1.quantity) # orderquantity= int(request.POST.get('quantity')) # obj1.quantity -= orderquantity # obj1.save() form.save() # print('this is after update', obj1.quantity) return redirect('orderlist') return render(request, 'order/order_update_form.html',{'form': form, 'obj':obj })
Cynthia
Above is what I have tried to do but it's not working as I expected
on
Can i automate my site map creating and updating in Django?
Cynthia
Anybody
Doragonsureiyā
Anybody
Maybe anyone is here, yes, but they are not obliged to read everyone's message here neither to reply to everyone's message, if someone wants to reply to your message, they will do that, just don't try to draw attention to your message writing "anyone?" every 5 minutes, that will lead you to be warned for SPAM/Flood, just be patient or use Google/DuckDuckGo to research about your question instead of wasting time here waiting for people to do your work. Have a nice day 😊
Mahan
Hi is there any way to get messages of public channel and display in django website? Currently i receiving messages with telethon but when i use it in view i get this error: There is no current event loop in thread 'thread-1'
Alessandro
Hi, what I need to do when I change the model.py? I need reset the fields of the database?
Alessandro
I change one variable name and now the django get some errors. Thank you
Shubham
Hi, what I need to do when I change the model.py? I need reset the fields of the database?
After changing the variable name, you have to run 2 commands to reflect the changes on the database 1. python manage.py makemigrations 2. python manage.py migrate
Alessandro
I did this procedure but when I openned the database the old name remains.
Shubham
It should have been reflected on the db
Shubham
I think you will need to change all the places where you used those field names in the codebase
Alessandro
Its strange. Nothing change in the database. I change the field direct in the database and now it is working.
Alessandro
the commands 1. python manage.py makemigrations 2. python manage.py migrate dont change the database
Shubham
Ohh, good you got it working
Gk
Anything on otp on form in Django