Proton
Hello guys Does anyone have an idea on how to convert all ids to uuid I keel getting some constraint errors when performing migrations And int does not have replace ....
Дмитрий Борисов
Д
The UUID can be thought of as a huge integer too if that helps
Д
No
???
Д
The bot should do bot things.
Suraj
i can't understand what you trying to ask
I mean how can we acces our project which is on local machine by using any other device. Though I checked some docs but wanted to know the easiest
Д
I mean how can we acces our project which is on local machine by using any other device. Though I checked some docs but wanted to know the easiest
Yes. The settings needs to have ALLOWED_HOSTS https://docs.djangoproject.com/en/4.0/ref/settings/#core-settings
Morteza
Д
Set that to ['*']
Suraj
Set that to ['*']
Empty list to '*'
Suraj
Okay then next
Д
That should be it I think.
Morteza
Okay then next
are you using drf?
Suraj
It's been 4 days I'm learning django so i don't know what you are saying
Morteza
It's been 4 days I'm learning django so i don't know what you are saying
actually now i understand what you mean You can do this and deploy the project locally but you need linux installed on your system or virtually. but the better way is to deploy the project somewhere else like heruku, it's easy and free and there is bunch of tutorials out there.
Suraj
Heruku ... ohkay...will check then
Д
The runserver command will run the server and it should be accessible, Linux or not.
Morteza
windows is not a good idea
Д
he want access the project on other devices.
I assumed he understood the implications of running the server locally. That he wants to access it from local systems.
Д
If he wants to deploy the app for the world to access, then Heroku will be needed.
Д
But the usecase is not well-defined. Or was there something I missed?
Tony
guys i am creating a backend for mobile application(flutter) i used django rest framework
Morteza
but i wonder that he only started django about 4 days too soon for deploying i think
Tony
what should i do now
Д
what should i do now
Masturbate? Who knows. What are you trying to do
Tony
Masturbate? Who knows. What are you trying to do
haha i mean to end my part of the project
Tony
i heard that i should uplod my project on some server?
Д
haha i mean to end my part of the project
How do you think a human being can help from this position
Morteza
But the usecase is not well-defined. Or was there something I missed?
Yea it wasen't well defined but in his question he pointed out that he wanna access the project from other devices.
Morteza
i heard that i should uplod my project on some server?
search for deploying django project on heroku, digitalocean, vps or whatever service you want.
Morteza
He needs to check the allowed_hosts first.
i doesen't really help him without deploying the project somewhere.
Д
i doesen't really help him without deploying the project somewhere.
Well, it's required for the server to be visible from localhost too since the web interfaces won't be served by default
Tony
That would require him to put in some effort...
i don't know what is the big deal of me not knowing the right steps and coming here to ask
Suraj
I assumed he understood the implications of running the server locally. That he wants to access it from local systems.
I don't want to deploy rn. I just want if it's open in my laptop (local) i can access the app and full the contact form from my mobile or a friend of mine who's willing to access
Narayan
How can I integrate own html template in django admin panel.
Anandv
I have learnt Python basic and advanced stuffs (oop)..and have a little bit of knowledge in django...i need to do a intermediate level project in django..any suggestions????
User
I have learnt Python basic and advanced stuffs (oop)..and have a little bit of knowledge in django...i need to do a intermediate level project in django..any suggestions????
You can start with django, just go for some tutorials or django documents and then after learning django basics you can make a intermediate level project
User
I am integrating razorpay in django, but when I select net banking option, the pop up page gets blocked. The payment is done successfully,but the page gets blocked. Can anyone plz help? I have also allowed popups in chrome settings.
Andrej
Looks nice - do you use users phone to send the text message? Sorry, didn’t read documentation
Yes, the user can download an Android app and connect his smartphone to the Platform. The user can use a REST-Api to send and receive text messages to and from his own smartphone.
Abdulwahab
Hello guys, If may I have a question, How to implement the same style of setUpTestData() in pytest ? to create some DB entries on class level. those DB enties will be shared/used across all test cases inside the class.
Anonymous
Mates, what is the difference between a Slug and a String?
Proton
Hello everyone can anyone help with how to configure *EXIM* server on django project
Doragonsureiyā
Hello everyone can anyone help with how to configure *EXIM* server on django project
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.
Adhil latheef
How setup firebase bucket as default_file_storage in django.....can't find any documentation in Google
Bullet
Hi u guys
Bullet
any body .. modal login email with django bootstrap can help? All procees is working but .. modal doesn´t work ...
Bullet
Anybody can give some light?¡
Bullet
I was customizing my loggin with email and username.. that´s works fine.. but when I try to use it in a modal.. mm.. nathing!! no errors, no redirect, no loggin..
Bullet
I´m stuck in this simple little thing, and I´m with a terrible headache... U know, I can´t even breathe because, since 3 day i´m trying.. It´s too much..
Bullet
So that´s why I came to disturb your peace... I´m sorry becasue I´m not good enough
Ali Hasan
Hello, does anyone know why .filter() is returning the same object multiple times ?
Ali Hasan
for example , .filter(id__exact='something') is returning that object 3 times
Ali Hasan
Because it fits the query
I know but the object is unique and only one row has that id (obviously)
Maxim
Hello, does anyone know why .filter() is returning the same object multiple times ?
because your query contains a join and you get one object several times through different objects of another type
Bullet
if I can help..
Ali Hasan
paste the code to analise it
This made the above message clearer (But there are 3 objects pointing to it)
Ali Hasan
Ok so yeah my query has to prefetch things (3 in this case)
Ali Hasan
but shouldn't it just join them all in a single object ?
Maxim
How do u know if had a join
because what you described almost directly indicates that
Ali Hasan
May I paste the query here and explain what I have exactly in DB ?
Ali Hasan
departments = list(Department.objects.filter(id__exact=request.auth['building_id']).distinct().order_by( 'name', 'branches__name' ).prefetch_related( 'branches', 'branches__programs', 'branches__programs__stages'))