Mohsen
thanks 🙏
Mohsen
you helped be alot
Binary
DRF is your right choice, there is nothing better to adopt
But the serialization is very slow here
Muflone
But the serialization is very slow here
How very is your very slow?
Binary
How very is your very slow?
For almost 1000 objects it take almost 3 sec
Muflone
For almost 1000 objects it take almost 3 sec
This doesn't seem correct, there's something inefficient in your serializer
Mohsen
i checked drf websites it feels kinda useless i mean i can send my jsons easily using only django what's the point if drf here?
Muflone
Using inbuilt model serializer
How nested are those models?
Muflone
Mohsen
0
Muflone
With user only
Share your project url to measure it in another system 3 seconds for 1000 users with few fields is extremely slow
Binary
Here is the main endpoint
Muflone
This is not useful, share your project sources
Mohsen
If you want to work for Android then how you can use json here?
i have no experience in android development it's not possible to use json?
Muflone
i have no experience in android development it's not possible to use json?
It's possible, but you'll have to create some things already included in drf
Muflone
exactly what i have to create
DRF already does the things, in a way better than yours probably
Mohsen
i kinda understand
Muflone
My first android application used your approach because I didn't know DRF but it was poorly designed and implemented, plus lacking some security steps needed
Mohsen
You can use postman for testing
yeah I know about that but i feel better using cli tools this way i can learn much more
Ali
Yes thats right, also you can use python requests library
Ali
But curl also good choice
Mohsen
My first android application used your approach because I didn't know DRF but it was poorly designed and implemented, plus lacking some security steps needed
you know im kinda confused to approach development there is alot of thing to learn but i'm hurrying to develop it 😅
Muflone
yeah I know about that but i feel better using cli tools this way i can learn much more
Now move your attention to your friend which has to implement the frontend without knowing your source code Drf offers a swagger endpoint DRF offers a lot of ways to authenticate
Ali
Also I work with big data drf is okey with response, I didn't show any problem with timing. If you have problem with response time there is a logic error with your code
experes
hi anyone knows why when i command pip install Pillow its around 50MB???
Doragonsureiyā
hi anyone knows why when i command pip install Pillow its around 50MB???
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
experes
nope
django is using pillow for img fields and thats why im here
Charly
django is using pillow for img fields and thats why im here
But your question is not about Django specific things but a python library
Y
Hiiii Basically I create a registration page and login page Now I want add if any user login or register the message will b show on my email This user add,user email, password I try but not working How can I do..??
Y
I created registration page or login page now want do If any user will register the message will b show on my email New user add with name or password
Y
I try chat gpt code but not working
Charly
I try chat gpt code but not working
Forget ChatGPT and start to look at the documentation
Y
Ohky
umarxon
Hello, my question is regarding Django and Telegram Bot integration. I set up a webhook to a URL, meaning when I send messages to my bot it will send that message to my django web server. I was wondering as only one url can be attached to one bot, meaning I have to process all the bot operations in one Django view? like so: class View(): def post(request): if message == 'start' start_function() elif message == 'help' help_function()
umarxon
Yes
but doesnt it make the code error-prone, all the logic of the bot that sits in one view? seems redundant
umarxon
No, it all depends on how you write it.
can u shed a light on this?
Charly
can u shed a light on this?
I don't know what exactly you need
Charly
What have you tried and Why you think you'll have an error prone program?
umarxon
What have you tried and Why you think you'll have an error prone program?
in my case it is going to become a large if elif code block if message == '1': . . . elif message == '10' and when i need to add another operation i have to implement another if block
Mahhhh
Hi everyone Can I learn django? I know English language alittle I'm iranian and our language is persion May help me?
Doragonsureiyā
Hi everyone Can I learn django? I know English language alittle I'm iranian and our language is persion May help me?
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
umarxon
well then do it in a better way, implement a class to so you can have methods for each handler and so on
ye thanks mate, already figured it out, it had an updater method that would forward all bot messages to functions that had bot decorator
•-elHam
Hi I I there Unfortunately I deleted my posture database form djnago project, What can I do?😭🥲
•-elHam
Plssss, tell me something 😂🥲
clouded
Plssss, tell me something 😂🥲
You have been told something. Next you need to believe and accept, then you can move on.
cj
Plssss, tell me something 😂🥲
do you have a backup? —I guess no, otherwise you wouldn't be here asking that—
Anonymous
Hey guys, I just encountered an error that says: "A server error occurred" while I'm trying to access Django admin page. Please 🙏 do anyone have an idea 💡 of this erro
Anonymous
read the logs
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/django/utils/timezone.py", line 82, in get_default_timezone return zoneinfo.ZoneInfo(settings.TIME_ZONE) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/zoneinfo/_common.py", line 24, in load_tzdata raise ZoneInfoNotFoundError(f"No time zone found with key {key}") zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key Africa/Lagos' [20/Nov/2023 20:38:38] "GET /admin/login/?next=/admin/ HTTP/1.1" 500 59 Here is it, and I've tried to change the timezone value yet 🙃 it still not working 😕
min
And be careful when you read an exception output
Aaron
Hey Guys i had a problem on my django app can u help me
Doragonsureiyā
Hey Guys i had a problem on my django app can u help me
No one can help you until you explain your difficulties.
Aaron
I hosted my django app in vercel with supbase as a database ,but when i use the post method it shows an error that says "os error read only permission " ,shortly i can't write anything on the hosted app
Anonymous
And be careful when you read an exception output
Okay; I got the solution ☺, I went to Stackoverflow.com to discover that I need to install 'tzdata', which I just did, now it's 😅 working as intended. Thanks for your contributions
Confident
what's the best hosting type, company, and plan for Django projects? 😭😭😭