Varun
Ok
Павел
Hello everyone, I made a project with a store where you can use the admin panel to connect products to the store, and when I put the site on hosting and turned off debugging, the products stopped loading from media images, how can I fix this?
Павел
you need a webserver, like nginx, to distribute static
thk , I'll look for info on implementation
Alisher
Sup guys where can I quickly learn Django Rest Framework with hands-on practice? And what project can I build for practice?
Asterix
Hello guys, how to connect gps tracker to Django project?
Asterix
And which trackers are possible to connect?
Alek
Could you please advice how to create to celery queues? https://stackoverflow.com/questions/79306315/cant-create-second-celery-queue
colo
customuser_groups
colo
hello, how to import the table customuser_groups in my applications ? tks
Omran
Hi . I want to learn Django from scratch. What are the best free sources for that?
Doragonsureiyā
Hi . I want to learn Django from scratch. What are the best free sources for that?
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Maxim
I want videos
you asked for the best sources you got them
علی
Hello, how long does it take to learn Django, how much time should I spend a day?
clouded
Hello, how long does it take to learn Django, how much time should I spend a day?
As much as possible to keep up with whatever you have decided to spend per day.
Doragonsureiyā
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://dpaste.org - https://hastebin.com - https://bin.kv2.dev If you posted a wall of text, go back and delete it.
Iam
so , can i share the link of that code?
Iam
I am asking doubts first time in this group
Iam
https://dpaste.org/Bfuhc I am trying to connect postgres with docker , and docker is providing server for my project. The containers for this requirements are not building
Iam
this is the problem
Maxim
https://dpaste.org/Bfuhc I am trying to connect postgres with docker , and docker is providing server for my project. The containers for this requirements are not building
"I am using docker to connect ..." is a text that would be more useful here rather than behind a link
Iam
ok
Yahya
Is there any detailed tutorials for stripe integration in django project
Iam
Which one?
appseed-app for django application service
clouded
appseed-app for django application service
Did you run the docker-compose.yaml file as shared?
clouded
yes
<dbname> is supposed to be replaced.
Iam
yes, I given a name and password . i hide it for security reasons
clouded
yes, I given a name and password . i hide it for security reasons
How do you restart the containers for testing changes you make to the docker-compose.yaml file?
Iam
How do you restart the containers for testing changes you make to the docker-compose.yaml file?
i am using docker desktop and sometimes i will give commands in cmd of vs code. the docker-compose build is unable to execute, and can;t create a container. the issue might be in network connection , not in db
clouded
i am using docker desktop and sometimes i will give commands in cmd of vs code. the docker-compose build is unable to execute, and can;t create a container. the issue might be in network connection , not in db
When building a container image, you cannot access the other container images that are supposed to be run together. Building a container image is different from running it. When you get this error while building, you are expecting another service to be up and that the container you are building has access to that other container while it is being built.
clouded
i am first time using docker, please give me suggestions to correct this
That was a suggestion. To be a bit clearer, you need to check the file that contains instructions to build the container image that fails.
Anvar
Guys, Hello! I need some help with my task. I have Groups and Permissions witn m2m rel In admin i try to add permission to my group, but i have many permissions and i after save take 400 with message: The number of GET/POST parameters exceeded settings.DATA_UPLOAD_MAX_NUMBER_FIELDS How i understand, admin ui try to send all data, not only changes for saving. Can i send only added permissions for saving in group? I dont support this approach, when we send all data
Big devil
mtproto proxy is blocked by GFW! Is there any brother who is an expert in this area?
M
TypeError at / 'module' object is not callable Request Method: GET Request URL: http://127.0.0.1:8000/ Django Version: 5.1.4 Exception Type: TypeError Exception Value: 'module' object is not callable Exception Location: PycharmProjects\pythonProject3\.venv\Lib\site-packages\django\template\context.py, line 256, in bind_template Raised during: magazine.views.home_page
M
How i can fix it???
M
TypeError at / 'module' object is not callable Request Method: GET Request URL: http://127.0.0.1:8000/ Django Version: 5.1.4 Exception Type: TypeError Exception Value: 'module' object is not callable Exception Location: PycharmProjects\pythonProject3\.venv\Lib\site-packages\django\template\context.py, line 256, in bind_template Raised during: magazine.views.home_page
Root file urls.py from django.contrib import admin from django.urls import include, path urlpatterns = [path('admin/', admin.site.urls), path('', include('magazine.urls')),] File urls.py for Django app from django.urls import include, path from magazine import views urlpatterns = [path('', views.home_page),] This is file views.py for app from django.shortcuts import render def home_page(request): return render(request, "home.html")
AZ
Make sure you import the render correct, Also make sure you add the template in settings.py after that you can use the template , Check if you have file named module.py in your root if there is file like that rename it to another name
Iam
That was a suggestion. To be a bit clearer, you need to check the file that contains instructions to build the container image that fails.
Thank you for your suggestion, I could run the containers successfully, but yet not working with api, thanks for the support
AZ
Thank you for your suggestion, I could run the containers successfully, but yet not working with api, thanks for the support
If you want to work with api you should first install django rest framework, then add @api_view above the function, and also you should return Response not render template because you want to return info not template , with these dajngo api should works
Iam
was your issue resolved
not completely , i am trying to access the db, through api-using django . ui is in react. server is running in docker, but error is index.js:135 POST http://localhost:5000/api/users/logout net::ERR_EMPTY_RESPONSE
Iam
Check connectivity to your docker container
docker containers are running
SHEIKH HAFIJUL ALI
docker containers are running
running doesn't mean they are reachable :)
Alex
share your dockerfile and docker compose yaml file
SHEIKH HAFIJUL ALI
so, how can I?
+ share your django code for connection (in pastebin)
Iam
ok
SHEIKH HAFIJUL ALI
nginx
i guess this is your react frontend
AZ
not completely , i am trying to access the db, through api-using django . ui is in react. server is running in docker, but error is index.js:135 POST http://localhost:5000/api/users/logout net::ERR_EMPTY_RESPONSE
Thats good, after your connection works, Add middleware inside django then add token to connect between react and django . To let django not accept request until the token inside the headers
Iam
was this code Chatgpt generated?
not completely , But it is. i am using a django -react admin panel which is build in
SHEIKH HAFIJUL ALI
your postgres container is in exited state. Postgres docker container doesn't run without a valid POSTGRES_PASSWORD Also, compose file doesn't seem to be right
clouded
nginx
But Django runs in a different container?
Iam
i guess this is your react frontend
the other containers are postgres_db, appseed_app, and api-server-django-web-1. I am learning docker, and i have confessions for this question, and i am not sure about my answer
SHEIKH HAFIJUL ALI
Alex
the other containers are postgres_db, appseed_app, and api-server-django-web-1. I am learning docker, and i have confessions for this question, and i am not sure about my answer
If you are not restricted to this configuration, i have a django docker template which you can use and then build your app on top of it.
Charly
I need some time to discus with my head, that's a good idea
actually is a bad idea to change the template for an already made project