All Questions
Tagged with production-environment python
61
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 ...
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 ...
0
votes
0
answers
39
views
How to host a proper Python Flask server with HTTP, HTTPS and interactive debug shell, all in the same global namespace?
In Python Flask, if you run app.run(), typically you get the following message:
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
...
0
votes
1
answer
583
views
How to pass an environment file .env in a production environment via an ".env" file?
I am currently playing around with Python Flask. I am trying to understand the configuration of environment variables better. I know how to pass environment variables to my code when in development ...
0
votes
1
answer
88
views
Why does my Flask app search results page need to be reloaded to display results only when served by nginx?
I have set up a flask-based site that takes user input and makes a query to a postgres database. It works great when I run the app locally, but when I take it live on my vps, the search results in an ...
0
votes
1
answer
976
views
how to set Environment variable in Json file. ( Clients Secrets, Client Id etc)?
my client-secret.json contains something like..
{
"web": {
"client_id": "asdfjasdljfasdkjf",
"client_secret": "...
1
vote
0
answers
137
views
Microsoft Azure Jupyter Notebooks - relative path to a file for prod
I want to make my Azure Notebook production ready but I am having issues with the relative path in the folders.
When executing the code to be run in the main, the relative path to files becomes the ...
0
votes
0
answers
80
views
Users change codes directly on the production server
I'm working on a project that has all its data written as python files(codes). Users with authentication could upload data through a web page, and this will directly add and change codes on the ...
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 ...
-2
votes
2
answers
925
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|...
9
votes
3
answers
7k
views
Flask-Login vs Flask-Security for Production Environment
I am building out a feature for users to register, login, authenticate and authorize themselves, specifically using Python (Flask) for the backend. I've found a few solutions such as flask-login and ...
2
votes
0
answers
308
views
Multiline env var in docker parsed differently in production
I have a docker-compose.yml file similar to this:
some_python_service:
...
CREDENTIALS: ${credentials:?err}
...
And a .env file located in the same dir as the docker-compose.yml:
credentials='{
...
0
votes
2
answers
1k
views
flask postgresql sqlalchemy configuration for production and development
I am trying to configure my postgresql for both production and development envronment in flask.Right now my configuration only works for local environment.I want to also make it work for production....
1
vote
0
answers
100
views
Flask-Admin not working on Production server (CSS and JS not loading)
I'm facing a problem with Flask Admin. Here is the problem:
When running Flask on localhost, everything works fine but once in production, all the static file from Flask-admin are not loading properly....
12
votes
2
answers
22k
views
How to set environment variable based on development or production in FastAPI?
I want to have different environment variables based on development and production
but i can't seem to find anything related to this topic for FastAPI.
Is it possible that i can have .env, .env.local, ...