Rustambek
Vaibhav
What you mean by you must capture count
How are you are.. It's not working
Rustambek
It does reduce the code.. u just have to capture the count...
Yes i have captured the count of sql queries
Rustambek
But it does not reduce anytging
Rustambek
Yeap
Rustambek
https://linkode.org/#aXTAGZDQ2S4zFJJccKdls5
Shukurillo
Hello, how to make request inside django view to elasticserach with requests package ( all components dockerized and have docker-compose file)
G
Hellow I am a beginner in django were can ii get besty studying resources or if u have a resource u may just send 2 me It will bve more Better
Gaurav
Hi guys, i have made a django website which is working fine locally and now I am deploying it on digital ocean using nginx, gunicorn and postgresql. getting issue while deploying can someone pls help me
Gaurav
I am following this blog: https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-20-04
Gaurav
this channel does not allow to send pics, I cant send you the screenshot but I can send the screenshot of the error in personal chat
Gaurav
Well I can, let me try so following the mentioned blog I setted up the gunicorn but the command: sudo journalctl -u gunicorn is giving me error: keyerror: 'SECRET_KEY'
Gaurav
I have added SECRET_KEY in the system variables and verified it by the command: echo $SECRET_KEY but still it is showing error
Mohaali
So, I was making a custom user model and to be able to change the password using the admin page I did this on the UserAdminChangeForm, is it wrong?
Bright
Google hw to fix nd deploy Django apps. It seems u hv to hash out sm settings dat ar only needed during production. So Google hw sm people das it
Gaurav
Google hw to fix nd deploy Django apps. It seems u hv to hash out sm settings dat ar only needed during production. So Google hw sm people das it
Bright, if this for me, I have already made changes in my settings.py file as per production environment
G
Any other with some helpful resource like books and vedio links
Doragonsureiyā
Any other with some helpful resource like books and vedio links
Check out PythonRes, a channel for Python resources - video courses, pdf books, tutorials and other info to help you learn Python.
Mohaali
https://www.toptal.com/developers/hastebin/oritehoxoz.makefile
The '../password' is the thing that's worrying me
Shamnad
Bypass password validation and create user anyway? [y/N]: y Superuser created successfully. free(): invalid pointer Aborted (core dumped)
stretch
Hello! I want to make StreamingHttpResponse with following conditions: ASGI + Queryset iterator (SQL server side cursor+chunks). The main idea - is streaming large data from SQL to HTTP client directly. Something related links: link1, link2, link3. Does anybody implemented this task?
Tareq
Hi guys
Tareq
I want help to Build an Image Classification API Using Django Rest Framework.
Tareq
I want to Deploy Keras Neural Network to django
Tareq
I have my ML model but I don't know how Deploy it
@
I have my ML model but I don't know how Deploy it
Why not just dump the model with pickle and save it in your project then you can load it backend.... Never used Django for this but I've used flask quite a number of times
Leon
hello, I ran into a problem when using Swiper JS, navigation buttons and pagination are not displayed, although through the page code in google chrome, I see that they are (when opening the HTML layout, everything works correctly)
Leon
I thought maybe someone faced this problem, because there were no problems with layout, and after I added the template to the Django project, everything stopped working
one of 1000
Hi everyone, I want to designa tourism website but with Django, can you please send me a good website or video for learning Django?
Doragonsureiyā
Hi everyone, I want to designa tourism website but with Django, can you please send me a good website or video for learning Django?
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
hesam
django.core.exceptions.ValidationError: ['“name” value has an invalid format. It must be in YYYY-MM-DD HH:MM[:ss[.uuuuuu]][TZ] format.'] Friends, can anyone help me to fix this error? I can't migrate, but makemigrations works It was necessary to tell me to send the project codes Thank you
Mohammed
Yes sure
Doragonsureiyā
can i send you the model ?
To share code or error tracebacks, use a pasting service, like: - https://linkode.org - https://dpaste.org
......
The image on this site should be posted sequentially
Doragonsureiyā
The image on this site should be posted sequentially
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
Doragonsureiyā
Unable to send photos to group
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
Jet
Thank you but how did you put it in modules.py It's not clear for me
Okay for example, I at some point maybe want to send an email upon registration, on the models level and maybe on the views level. I will get this common logic out of the two files and put in modules.py Then I start to freely call it in both models.py and views.py. But if I wrote this in views and then imported it in models, remember views also import models, then that would be a circular import error
Shadow
where ?
Model? Database?
Shadow
Probably there u set it to date time
Of course
Hello, some one explain me that this code how works>> my_list = sorted(my_list, key=lambda k: k['name'])
Mahmood
Hi everyone I have a custom user model in my Django project And i have a table called auth_user Which have one user that added before i added the custom user model And for now when i save any data in the admin dashboard, it save if it's the first user If it's new user it gives me this error "insert or update on table "django_admin_log" violates foreign key constraint "django_admin_log_user_id_c564eba6_fk_auth_user_id" DETAIL: Key (user_id)=(11) is not present in table "auth_user".
Mahmood
What should i do
Mahmood
And when i create a new user It doesn't added to the auth user
Anonymous
then remove all migrate file run makemigrations and migrate again
Mahmood
there is no way without remove all the data
G4st0n
Guys is django loosing popularity?
G4st0n
According to stackoverflow survey is pretty low
Kenechi
According to stackoverflow survey is pretty low
It's not losing popularity Many companies still use it
Mahmood
don't give bad advice
do you have a good advice for my problem
Maxim
do you have a good advice for my problem
yes, don't take bad advice - migrations should be handled with extreme caution
Maxim
Guys is django loosing popularity?
this is not a group for small talk
Mahmood
Sharing some codes will help
I just added new users app, and create custom user model with the AbstractUser, and set the custom user model in the AUTH_USER_MODEL in the settings file, but what i saw in the data base i still have auth_user table which i'm not sure if it should be deleted or not, but it's what causes the problem
Mahmood
I think is foreign key issue in your database or in your code
This is the error message: "insert or update on table "django_admin_log" violates foreign key constraint "django_admin_log_user_id_c564eba6_fk_auth_user_id" DETAIL: Key (user_id)=(11) is not present in table "auth_user"." As you see here, it's trying to insert to the django_admin_log table, but the the user id is not in the auth_user, There should be a way to tell Django to use the custom user tabel when trying to insert to the django admin log, not using the auth_user table because it should be not using now
Shadow
This is the error message: "insert or update on table "django_admin_log" violates foreign key constraint "django_admin_log_user_id_c564eba6_fk_auth_user_id" DETAIL: Key (user_id)=(11) is not present in table "auth_user"." As you see here, it's trying to insert to the django_admin_log table, but the the user id is not in the auth_user, There should be a way to tell Django to use the custom user tabel when trying to insert to the django admin log, not using the auth_user table because it should be not using now
"django_admin_log_user_id_c564eba6_fk_auth_user_id" DETAIL: Key (user_id)=(11) is not present in table "auth_user"." The important issue is in this line. The problem is u r trying to link the user data that is not present in the database, in your code u must make sure that u r saving it to the database before u save an object that is related to foreign keys
Shadow
Is a integrity error, search that on google and there will be help :)