parandhamudu
Ho using db or files
parandhamudu
Frist end to create api
parandhamudu
Read files using glob
parandhamudu
After fitting model ok
Divya
Sergey
Hi, who knows why get_or_create can raise multiple objects returned?
Vaibhav
parandhamudu
Sergey
parandhamudu
Same way like that
Vaibhav
parandhamudu
Multiple columns to connect with single table to table
Sergey
is add function on m2m field create object of model that connected?
Sergey
or just object of "through"?
Vaibhav
It creates objects in through table
Sergey
than if i have two fields(for get or create), how its possible to get more than one objects? * if i always used get_or_create..
parandhamudu
Table to table possible , columns to tables also possible
Vaibhav
Ummm
Sergey
Model.objects.get_or_create(field_1=value_field_1,field_2=value_field_2)
Vaibhav
You are querying using get and in get, it can return more than one object
DeepState
I want to get all data from my database and not only one.my code in the views and html
Vaibhav
Vaibhav
It depends on your table schemes, to what is unique/ pk and what is not
Anonymous
Hi everyone, i have a question somebody where able to start a project on Django/Windows subsystem linux distribution (WSL) without Sqlite as database and if thats the case which database did You applied and how? Because i got
Anonymous
trubbles with it thanks anyway
Phill
Hey guys, is docs.djangoproject.com up for you guys?
Anonymous
Hi, please help.
The programmer left one on one with the Django project, and I need to open the database according to him, psql and get all the usernames from there, everything is there to enter, but while I tried to go through python and downloaded everything, then I got the admin panel and apparently the whole project.
don't care for the project, I need usernames. how can I get it. when I try to access this database through python, I write an error
Anonymous
Stefan
Alcides
Hi! Everyone.
Please I would like do deploy my python-django application using docker.
I Would like to use 2 docker container:
One to apache and wsgi and another one to python itself.
Please, I am looking for a docker-compose.yml file as an example.
Thank you very much in advanced for any help.
Michel
Hi, I'm trying to whitelist my localhost from CSRF
CSRF_TRUSTED_ORIGINS = [
'127.0.0.1:8000',
'localhost:8000'
]
but I'm still getting Forbidden (CSRF cookie not set.) error
Rohan
How to upload my project so that I can send to anyone using link
Rohan
And where to upload it?
Shadow
Shadow
Stack overflow
इमरान عمران Imran
Hi, I'm trying to build a stripe payment integration in django, I want to know what's the best practice to store the secret keys
Imdadhussain
Anonymous
Michel
Michel
Anonymous
Yes
Michel
Well, no, it didn´t work
Michel
I've got the allow host error before, but I'm not getting it now even when ALLOWED_HOSTS = []
Anonymous
ALLOWED_HOSTS = [here you need to add those local host ]
Michel
I did it, no change
Michel
But why would it be necessary for the CSRF ?
Anonymous
Did you add {% csrf_token %} to form
Michel
and right now I want to whitelist localhost
Axror
Hi everyone. I am going to create place address search app. How can I do it. pls help
Maxim
Sergey
Hello everyone! Who knows what it's mean(below), and to create objects of m2m with through properly?
Method 'add' cant be used with many-to-many relations if intermediate model is used. consider call it on intermediate model manager.
Sergey
or I can just ignore it?
Anonymous
and right now I want to whitelist localhost
Actually this has nothing to do with the host
Django expects csrf for post requests, either you disable with csrf_excempt decorator or class to view
Or send authtoken in the request
@michelromero
Michel
but what about this then
https://docs.djangoproject.com/en/3.2/ref/settings/#csrf-trusted-origins
Michel
why?
Michel
Anonymous
Are you using any auth?
Michel
Are you using any auth?
I'm using the auth that comes default, I'm using the admin, not sure if that's what you mean
Anonymous
Lok
Anonymous
Ok
इमरान عمران Imran
Mirco
thnx
Or if you are using cloud platforms, you have services like Secrets Managers
इमरान عمران Imran
Martín
hi, I'm with a django webapp against legacy database, tests are working creating the test database on-the-fly
but now I want to create some data in order to run the test with this data, is there any strategy for creating data in this temporal database to be deleted after the test process?
I've been reading something about replica databases, but I'm not sure if this is what I need
Anonymous
Has anyone worked with celery and drf extensively?
I need a help
Doragonsureiyā
Has anyone worked with celery and drf extensively?
I need a help
Don't ask meta questions like:
"Any user of $x here?"
"Anyone used technology $y?"
"Hello, I need help on $z!"
Just ask directly! The better you are at explaining the problem, the more likely you are to get help.
Asking smart questions
Anonymous
Yes
Anonymous
You can use exclude
Phantom