Questions tagged [WSGI] (40)

4
answers

How to make a web a muzzle to run python scripts?

Good afternoon. Trying to implement the project of discharging accountability via the web interface. The user visits the Web page, select a report that does the filtering (by date for example) to run the report which on execution produces the excel file. At the moment I have a python script which connects to our Oracle dat...
Ethel_Nol asked April 16th 20 at 11:20
2
answers

In production, Django is not loaded css styles?

In General, transferred the project to a production server. The problem is that he sees styles not in apps and not in the admin area. team on the collection of statics introduced collectstatic The code below """ Django settings for shop project. Generated by 'django-admin startproject' using Django 2.2.9. For more informa...
talo asked April 7th 20 at 16:28
1
answer

How to configure mod_wsgi with apache when multiple VirtualHost?

Friends, Hello! Tell me where is the error in the configuration file, wsgi.conf, trying to publish a second web service, but only that which is written of the first, second after restart of the server is seen as a directory and writes no access.#Configure apache mod_wsgi file <VirtualHost *:80> ServerName pymain P...
Oma_OKeefe asked April 4th 20 at 13:51
1
answer

What should be the settings for wsgi.conf (Apache) to run multiple applications?

Friends, Hello! Trying to start the second application on Apache, but fulfills only the first VirtualHost, tell me what you are doing wrong, listing wsgi.conf :#Configure apache mod_wsgi file <VirtualHost *:80> ServerName pymain Pybsk WSGIDaemonProcess processes=1 threads=5 display-name='pybsk-service' restart-int...
Lauriane54 asked April 4th 20 at 13:49
1
answer

What a way for Python to WSGIDaemonProcess?

Hi all. Install pgAdmin 4. The manual has an example conf file.<VirtualHost *> ServerName pgadmin.example.com Pgadmin WSGIDaemonProcess processes=1 threads=25 python-home=/path/to/python/virtualenv WSGIScriptAlias / /opt/pgAdmin4/web/pgAdmin4.wsgi <Directory /opt/pgAdmin4/web> WSGIProcessGroup pgadmin WS...
Julia.Hessel asked April 2nd 20 at 15:31
1
answer

How the server calls the WSGI code?

Good day, interested in the question of the integration of web servers with Python code. As stated in the definition of the WSGI application, this is a callback passed to the server to which it sends the request object when the user accesses the resource. This knowledge becomes curious as to whoactually calls the Python cod...
Kathlyn99 asked March 30th 20 at 00:43
1
answer

How to respond to an ajax request in Python simple wsgi app?

Hi friends, trying for fun to implement a simple wsgi app using make_server. Feature the router which starts and runs the make_server function render different pages depending on the url. You have a page with ajax. Two questions arose: 1) How to implement ajax in this situation(in url which will fly ajax to specify the sc...
remington asked March 24th 20 at 11:57
0
answer

Why url_for duplicates url_prefix for blueprint when running flask via fcgi?

Good afternoon. There is a simple app in Flask: api.pyfrom flask import Blueprint from flask import url_for, jsonify api = Blueprint('api', __name__) @api.route('/', methods=['GET', 'OPTIONS']) def index(): links = dict() links['docs'] = url_for('.docs') return jsonify(_links=links) @api.route('/docs/', methods=['GET...
Sylvan.Eichmann asked March 18th 20 at 21:01
2
answers

How to solve a trouble with nginx and wsgi?

Hello. It took me to deploy a Django app. It was decided to use a bunch of django+wsgi+nginx. Is on ubuntu 18. Made the following configcat /etc/nginx/sites-available/lottery_service.conf #lot_serv.conf upstream django { server 127.0.0.1:8001; } server { listen 8000; server_name a.b.c.d; charset utf-8; client_...
flavie.McDermott31 asked March 17th 20 at 09:27
0
answer

Flask + gunicorn multithreading not working?

the body of the function:@app.route('/allusers') def all(): buff = [] for u in User.query.all(): buff.append([u.username, u.email, u.password]) print("before") time.sleep(10) print("after") return str(buff) called:gunicorn --bind 0.0.0.0:6789 main_app:app -w 3 --threads 12 But when you try to load two pages simultaneou...
retta.King asked March 16th 20 at 12:52