This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding:utf8 -*- | |
import re | |
from flask import Flask | |
from flask_sqlalchemy import SQLAlchemy as BaseSQLAlchemy | |
from flask_sqlalchemy import _SignallingSession as BaseSignallingSession | |
from flask_sqlalchemy import orm, partial, get_state | |
from datetime import datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding:utf8 -*- | |
import re | |
from flask import Flask | |
from flask_sqlalchemy import SQLAlchemy as BaseSQLAlchemy | |
from flask_sqlalchemy import SignallingSession as BaseSignallingSession | |
from flask_sqlalchemy import orm, partial, get_state | |
from datetime import datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mysite_uwsgi.ini file | |
[uwsgi] | |
# Django-related settings | |
# the base directory (full path) | |
chdir = /path/to/your/project | |
# Django's wsgi file | |
module = project.wsgi | |
# the virtualenv (full path) | |
home = /path/to/virtualenv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mysite_nginx.conf | |
# the upstream component nginx needs to connect to | |
upstream django { | |
# server unix:///path/to/your/mysite/mysite.sock; # for a file socket | |
server 127.0.0.1:8001; # for a web port socket (we'll use this first) | |
} | |
# configuration of the server | |
server { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# test.py | |
def application(env, start_response): | |
start_response('200 OK', [('Content-Type','text/html')]) | |
#return [b"Hello World"] # python3 | |
return ["Hello World"] # python2 |