Koen de
How to connect thr portage database with orm
Tricky. Because “Portage” is not just a database. From the Gentoo devs; https://gpo.zugaina.org/dev-python/peewee
The question has been asked on reddit as well; https://www.reddit.com/r/Gentoo/s/LuBgtRuXj0
Keep in mind that this is not perse related to Django
Asadbek8802
Sarvar
who can solve this issue i have used ellastic search in my project
Connection error caused by: ConnectionError(Connection error caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7f8bf2848af0>: Failed to establish a new connection: [Errno -2] Name does not resolve))
Binary
Рома
Hello.
Making simple mock server for testing usage with drf.
Have endpoint for object status.
Depending of real object status some field must exist or not.
What is best prectice?
1) have 2 different serializer. Each for required fields list
2) have 1 serializer and override to_representation method and populate data with extra fields using "if" statement
2 option seems to me less obvious, and probably realy bad decision
N*!M
hi. i have index html file
and i want to load static tag in it.
but its many src img code in it.
i want a way for doint all them in best way
N*!M
there is no plugin in pycharm??
its noe best way.
think you write a milion code in facebook . ))))
Dihfahsih
Django version 5.0 has really some cool improvements please devs checkout it could be fun
NARASIMHA
When deployments happen or by chance any worker are killed
i want my running celery task to update sone status in database
What way can i achieve this
Dihfahsih
Dihfahsih
NARASIMHA
this works wor warm shutdown
but coldshutdown, sigkill doesnt trigger the signal
NARASIMHA
What if any process is killed?
NARASIMHA
the post run signal will not be called
Dihfahsih
But you can try to handle it using periodic db updating
NARASIMHA
https://docs.celeryq.dev/en/stable/userguide/signals.html#id29
there is this worker process shutdown signal,
But it doesnt guarantee everytime
NARASIMHA
@dihfahsih anyway i got your code, but didnt get where you update the database when the process is killed
My only concern is for killed processes which happens during deployments or load increasing or during any service restart
Subodh
Actually I am new to Django, can anyone suggest me a better resource from where I start my learning journey.
Subodh
N*!M
can you send me a code for change all them? after ctrl + f ??
i dont know how to repleace all them with add {% static ——— %} in it
Branko
When I host my website my comment form don't work because csrf token dont let 403 error I have. How to solve this problem? On local mashine work normally.
Muflone
renji
K bro
Dev
which is better way to build forms ??Modelforms or custom HTML forms
renji
I had created the template
renji
But how I connect all the products
Doragonsureiyā
Muflone
☄️ TITAN ☄️
Branko
Muflone
Okay thank you and for default that not exist of course?
https://docs.djangoproject.com/en/4.2/ref/csrf/
Please don't be lazy, when someone points you something use any search engine to get the needed clarification (first google result with csrf Django).
The huge jump between remaining noob and starting to become pro lies here: to be able to use the documentation and the search engines
Branko
Valentin
Could it be that certbot doesn't let me use return redirect()? Does anyone know how to change it?
Charly
Valentin
The statement "return redirect('index.html')" does not work for me
Valentin
render, HttpResponse yes
Emmanuel
Please I am trying to serve images from my document directory using nginx, but I keep getting 403
Valentin
Emmanuel
No
Emmanuel
I don't want to change nginx user, I just want to allow nginx user to access my images inside documents directory
Valentin
it gave me a lot of trouble and the only way I found was to change the name.
Emmanuel
Wow what did you change it to, root, or username
Valentin
/etc/nginx/nginx.conf change user wwwdata to root
Emmanuel
Thanks
Valentin
did you solve it?
Emmanuel
I will do that after trying a few methods
Emmanuel
Emmanuel
Emmanuel
Is it in Django or nginx config
Valentin
for a filter and redirect is used for the django admin panel
Valentin
Curiously, none of them, in production it works perfectly, but when it comes to deploying to the vps it doesn't work for me
Anonymous
hello am working on a project and am using crispy form for my login but the form form field is not showing pls what can i do
Anonymous
hello am working on a project and am using crispy form for my login but the form form field is not showing pls what can i do https://linkode.org/#TrowxvtKim4tz7OixeO9g6
Julianto
How to run Django with Tailwind CSS without using a CDN?
ashu
Hey guys I have small doubt I created a double page form when user fill the form they only save the one form data
Ritik
Hey. I have been trying to implement Microsoft oauth2 in my django app. While trying to sign in this error pops up
AADSTS90019: No tenant-identifying information found in either the request or implied by any provided credentials.
Ritik
Any suggestions what I might be missing
Anonymous
Does anybody tell me how to add a static file in django
Anonymous
Doragonsureiyā
I did it but I had an error file that did not exist
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain:
- what you're doing
- what you're expecting
- what you're using
- where you're running the script
- what Python version you're using
- what packages and their versions you're using
- and the most important thing: show the code YOU wrote (read rule 5️⃣ for that)
and more details, that way your chances to get help will increase
Valentin
I have a problem with the return redirect() statement in the vps, it animates the redirection but it doesn't work. In production I was doing well, any ideas?
Muflone
any requests containing the expression doesn't work receive no help
Valentin
Sorry, but it literally doesn't leave a record in the logs, nor does it give me an error
Kesav
Can anyone guide me how to implement OTP authentication in login form using django