A
A
Alexey Samoilov2016-04-02 21:14:37
Nginx
Alexey Samoilov, 2016-04-02 21:14:37

How to set up wsgi + nginx for Flask application with complex structure?

There is a Flask application. I want to upload to the server. This tutorial describes how to do it for an application with a simple structure - Tutorial .
Here is the structure of my application:
35ba2b402a9449e69be3f5d9da9a8c48.png
Can you tell me how to set up the wsgi file in my case?
app/__init__.py

import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from werkzeug import generate_password_hash, check_password_hash
from app.forms import SignupForm, LoginForm

app = Flask(__name__)
app.config.from_object('config')
app.config['SQLALCHEMY_DATABASE_URI'] = "postgresql://postgres:[email protected]:5432/postgres"
app.config['SECRET_KEY'] = os.urandom(24)

db = SQLAlchemy(app)

from app import views, Models

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question