Skip to main content

All Questions

0 votes
1 answer
26 views

What is the best approach to handle class instances in django application in a production environment?

I would like to consider 2 approaches. First, you could create a class and its instance in a class and inside views import the instance and call its methods. Second, you import the class and create ...
Sachin Das's user avatar
0 votes
1 answer
41 views

Django Media Files Not Found (404) on Render Deploy

I'm having trouble serving media files on my Django application deployed on Render. The media files are being created and stored (I think) correctly on the server, but accessing them through the ...
Young Entrepreneur's user avatar
-2 votes
1 answer
38 views

Django Media Files Not Found (404) on Render Deployment

I'm having trouble serving media files on my Django application deployed on Render. The media files are being created and stored (I think?) correctly on the server, but accessing them through the ...
justlivinglife's user avatar
1 vote
1 answer
197 views

How to use Django - cPanel environment variable

While setting up a Django app in cPanel, I can assign environment variables. However, I am having trouble using them. For instance, I made an assignment as seen in the picture. But when I use it in my ...
Bedirhandd's user avatar
0 votes
0 answers
25 views

Setup web server for django backend: Nginx and Gunicorn configuration before database migration

Is it possible to setup Nginx and Gunicorn on my web server before executing "python manage.py migrate", since my database server is not ready yet? Chatgpt recommended me to execute first ...
Bruno's user avatar
  • 51
0 votes
1 answer
172 views

Traefik2 as reverse_proxy for Nginx in django production docker-compose

I have managed to build a small Django app some basic things. Localy works all fine and I'd like to start this WebApp on a production server I already have running. On this server are already some ...
WillHoh's user avatar
  • 69
-1 votes
1 answer
66 views

How often am I allowed to contact PayPal API?

Right now I contact the PayPal API to check the subscription status everytime the user enters the profile settings, and each time a new access token is generated. Is this considered a bad practice in ...
Vinko Oakniiv's user avatar
0 votes
1 answer
172 views

How to fix Django website showing 404 errors on all website links online

so i recently uploaded a my first django website on cpanel . After uploading i realised the website is showing 404 errors on all website links ... let me show the links and urls `from .views.home ...
Hustlermt's user avatar
1 vote
1 answer
432 views

Django: media files doesn't load up uploaded by user in production environment

I'm hosting my site in railway. Everything is set up and works fine but the images uploaded by user don't load up. settings.py STATIC_URL = '/static/' STATICFILES_DIRS = [ os.path.join(BASE_DIR,'...
santosh acharya's user avatar
0 votes
1 answer
159 views

How to map virtual environment's Python instead of the global on Windows production server for a django project

I have a Django project running on the production on Windows 10. I am using nginx and waitress. I've been using the global Python on my server (Python 3.9.5). I was wondering how I can use a virtual ...
user3288051's user avatar
-2 votes
2 answers
923 views

Django Admin in Production Mode doesn't load the admin page after login

I am having some issues with my production mode. In this case, my login page in admin is not redirecting to the admin page after a successful login. I get the server response as: 200. [pid: 58|app: 0|...
Max's user avatar
  • 51
1 vote
0 answers
303 views

Permission error with Django logs in production

When trying to apply logging config to my Django project on the production server, the site returns a 502 gateway error and sudo journalctl -u gunicorn shows the following Permission denied: '/home/...
Finn's user avatar
  • 996
0 votes
1 answer
1k views

Django 400 Bad Request when run in production with gunicorn

I am getting a 400 error on all my pages when I moved my django app from one hosting service to another, the hosting service I moved to is Scalingo. My settings.py file: DEBUG = os.getenv("DEBUG&...
HRoot's user avatar
  • 95
0 votes
2 answers
231 views

Application error on heroku failed to update heroku config

I have hosted a django project on heroku and I'm trying to update my environment variables through heroku config but, I wrote the following command heroku config:set SECRET_KEY="djang...j*...
shanas's user avatar
  • 1
0 votes
1 answer
383 views

How to properly manage django production and development files

How can I properly manage my development files and production files with source control like GitHub (private repo). I am new to Django and while publishing my code to production there are many ...
user16241015's user avatar

15 30 50 per page
1
2 3 4 5 6