Денис
cj
people never learn 🙄
Денис
probably they can touch anyone where they live
cj
Doragonsureiyā
❎ cj pardoned Brian for:
Link to Telegram group or channel (0/3)
cj
@larrb be careful, use a backtick ` to wrap @property when you send a message
Brian
okay.. Those are many rules? Can i post a stackoverflow link to provide context?
Brian
awesome. Got it!
Brian
Brian
I've also noticed you can't use the (source=something) argument
Brian
My question is, have there been any changes made and have not yet been updated on the docs?
Brian
Any one else experienced a similar issue?
cj
what version of Django and DRF are you using? 🤔
Brian
Brian
and Django==2.1.1
Rajat
How can i make web application in django which scans QR code nd send that data directly to database. Is there anyone who can share there views on this topic??
Shaikha
Hi
Shaikha
How can I filter a nested serializer in DRF?
Shaikha
And then how do I use in EndPoint URL?
R
Hi I'm trying to learn django
R
But im facing some problem at mysql connection
R
Please help me I'm don't know where I do mistakes
R
Sagar
Sagar
You have to replace the sqlite config with MySQL in settings.py
Code
R
Sagar
Sagar
Upload your settings.py in Pastebin
R
Mysql is not install
R
But i installed it
Денис
But i installed it
probably you haven't installed a Python lib for that. Like psycopg2 for Postgres
R
I install mysqlclient for mysql at pycharm
Anonymous
Feeling
Anonymous
NoReverseMatch at /blog/
Reverse for 'postdetails' with keyword arguments '{'pk': ''}' not found. 1 pattern(s) tried: ['blog/post/(?P<pk>[0-9]+)$']
Anonymous
what this error indicate
Germinate
Germinate
https://stackoverflow.com/questions/38390177/what-is-a-noreversematch-error-and-how-do-i-fix-it
Scrim
Hello all.
I search on google and other foruns, but i cant resolve this problem.
I make model class with FileField , upload_to media folder... all is fine. On template i put form with enctype="multipart/form-data" , but when i try send file the file can be select, but when i try to submit, on web notification appear: Plese select a file.
Scrim
I dont now what im doing wrong, if i put null=True and blank =True, i can upload file
Scrim
i used request.FILES too
Scrim
only null=True and blank=True on class model , i can upload
Scrim
but if remove it, i cant upload file
Yegor
Hi guys how can I read FileField into BytesIO object? I tried to google it but found only opposite result.
Андрей
Андрей
Open it, read, and write to BytesIO
Андрей
Yes
Yegor
I use cloud to store files
Андрей
Path to file on filesystem
Yegor
i cant just open it and read
cj
Let me 🦆 DuckDuckGo that for you:
🔎 Celery Django Tutorial
Yegor
Yegor
I've found a solution: my_model_instance.my_file_field.open().read()
cj
🙄
Yegor
Marvin
Hello fam. I've been struggling with an encoding issue for a while with my django application. I keep getting an
ascii' codec can't encode character '\xf6' in position 63: ordinal not in range(128)
Research leading to encoding but nothing seems to work. Anyone with a heads up on what I've overlooked? From submission I get led to the save method. My code :https://pastebin.com/QmWZPzVB
Remy
Quick question guys
When you have request.user in your view, and you always need to access its OneToOne relation for example
my_products = Product.objects.filter(owner=request.user.shop)
Is there a way to avoid that extra SQL query to get the related shop object?
Anonymous
Maz
Андрей
Germinate
Денис
Денис
I gotta go refresh this topic in my memory
Batman
can anyone help me understand how select_related and prefetch_related work, like are they cached for a particular request or throughout?
Mirco
everytime you have O2M or M2M is correct to use as you speed up queries
Remy
If the pagination uses the related object yes.
If you want to be sure, look at the number of queries before/after
Batman
hmm, I'll try that out, besides, do you guys use multiple settings.py for local and production environment?
Андрей
Андрей
try:
from local_settings import *
except ImportError:
my_prod_settings