cj
Ok, thanks
but you can use Django together with whatever xyzJS library
Anonymous
Question : I have a html file page1.html which rendered with some database data values and It has a Button. Once button clicked it redirects to another Page page2.html which contains a form. When page2.html form submitted Only the form datas are stored in Database. But I want to store old datas which was rendered with page1.html
Shivansh
Please try this and let me know what all amendments do I need to do in this application octrixtweetapp.herokuapp.com
Zaryab
Can anyone help or give reference to my project - I have to maintain a user profile of youtube alike videosharing platform and i have to show which user has uploaded how many videos how do i fetch list of users from django user auth and id of videos of that particular user and display.
Hey rajat , So basically, You can do that by adding up all the videos posted by a particular user. However , there are many ways to achieve that. But one simple way is to use "aggregate function" . a. Import the following:- "from django.db.models import Sum" b. Then, Model_name.objects.filter(user_id). aggregate (Sum("column representing the video")) This will add up the total number of videos posted by one single user whose Id is passed . CHECK IT OUT...LEMME KNOW
Orack
can we upload file using json serializer
cj
can we upload file using json serializer
do you want to manage files using an API endpoint?
cj
yes you can
Orack
yes you can
how to send file request via json 😐 ? like if i select form data it shows browse file button in postman
cj
how to send file request via json 😐 ? like if i select form data it shows browse file button in postman
https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects
cj
use FormData
cj
no i mean via postman
ah, no idea, I don't use postman 🤷🏻‍♂️
Orack
cj
how do u test apis ? httpie ?curl ?
Django's UnitTests 🙂 and if I need to make raw direct tests to endpoints, PyCharm HTTP request
Orack
hmm
cj
PyCharm is ❤️
Rohan
ah, no idea, I don't use postman 🤷🏻‍♂️
Same, I use vs code plugin called HTTP REST Client
cj
also, if you use DRF, each endpoint has a little frontend where you can directly interact with them, also you can use Swagger too
Rohan
Postman is an electron app afaik
Orack
basically like if i want to post blog name in json it would be like { id:005, title:myfirstpost, content: hello world }
Orack
can i put file:"/home/username/myfile.jpg"
cj
can i put file:"/home/username/myfile.jpg"
https://www.django-rest-framework.org/api-guide/parsers/#fileuploadparser
cj
https://stackoverflow.com/questions/20473572/django-rest-framework-file-upload
Anonymous
Hello, is there a way to read data from Google sheets using python / Django.
Sh
Any freelancing projects in Python/Django.
Sh
I am willing to take it up
cj
I am willing to take it up
this is not a job board
Orack
Any freelancing projects in Python/Django.
yes teach me django only for 0.000000$
Michael the wolf 🐺
yes teach me django only for 0.000000$
You are proprietory Obama now ?
Michael the wolf 🐺
you installed windows !!
Bozwkd
Hi, im trying make a web camera stream with my phone (python in android) and Django
Bozwkd
I have seen that websockets are usually used, but the client on android uses normal sockets (import socket)
Bozwkd
Is it possible to do that with these sockets, or do you recommend using websockets?
Bozwkd
Or if there is a better alternative, what would you recommend me to do?
Zaryab
Thank you so much
No issue bro...do lemme know wheneva stucked
Orack
👍
this doesn't work 😫
Master
Hello, is there a way to read data from Google sheets using python / Django.
Google sheets have an API: https://developers.google.com/sheets/api, so you can read them via requests library or anything similar
👨🏻‍🦲
anyone using plesk onyx hosting ?
Manoj
I am getting server error(500) why
Doragonsureiyā
anyone using plesk onyx hosting ?
Please don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello I need help on $z" Just ask about your problem directly! With 48k+ people the probability that someone will help is pretty high. Also please read: http://catb.org/~esr/faqs/smart-questions.html
R
I am getting server error(500) why
Dont ask in private, you can check logging docs is you dont know how to configure them: https://docs.djangoproject.com/en/3.0/topics/logging/
ㅤㅤㅤ
hi all!
ㅤㅤㅤ
how are you
ㅤㅤㅤ
?
ㅤㅤㅤ
I am going to ask something
ㅤㅤㅤ
could anyone help me ?
करन
First You will Ask Your Questions
Anonymous
Question : I have a html file page1.html which rendered with some database data values and It has a Button. Once button clicked it redirects to another Page page2.html which contains a form. When page2.html form submitted Only the form datas are stored in Database. But I want to store old datas which was rendered with page1.html
ㅤㅤㅤ
I have lots of objects in my database, and each of them has it's dateline and its status. if deadline has already passed programm should change its status automatically to overdue. else it's status should be normal. I dont know how to do this
Anonymous
Hi what is better ? Django girls Or Django original docs
ㅤㅤㅤ
Could u use a proper name for your Telegram account please ?
because I cant choose a proper nick for myself
Not Your Dad
Or have the routes in the same file, if its small enough
Anonymous
How can I change the default database in postgreSQL
Anonymous
Like I have two databases Postgres, Test
Anonymous
all alters, inserts, selects go with postgres and I want to change them to test
👨🏻‍🦲
Please don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello I need help on $z" Just ask about your problem directly! With 48k+ people the probability that someone will help is pretty high. Also please read: http://catb.org/~esr/faqs/smart-questions.html
oh, no im asking about deploy django with plesk hosting, i have access with ssh, but i cant use apt-get, yum, rpm, etc, i cant install anything but i can use python, so ive installing django but how to always running django server ? iv'e try using gunicorn with --daemon but when files change, in daemon doesnt change
Muflone
django/base.html at master · django/django · GitHub https://github.com/django/django/blob/master/django/contrib/admin/templates/admin/base.html
Muflone
👆
👨🏻‍🦲
i dont know how to stop / kill / restart the proccess
eKibz
Hey has anyone worked on django translation from English to any other language?
eKibz
DM me please
eKibz
okay, will do ,Thank you
ㅤㅤㅤ
What about "is_overdue" property? Compare timzone.now() with dateline.
yes, you are right. this works when you create that object you may identify if that objects is overdue or not. But imagine this situation. when you created object, its deadline will come after 4 days. and the method you suggested identifies that objects is not overdue. it is ok. but after 4 days, how it's status will be changed to overdue??in that question is.
ㅤㅤㅤ
I am thinking on celery. what do you think about this choice?