edgewood / webfaction-flask0.10-boilerplate Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Had a few issues. Differences between local machine and the remote webfaction hosts was mainly it.
i was using virtualenv on my local and webfaction uses pyvenv. needed to get pyvenv installed on my local machine.
sudo apt-get install python3.5-venv
using python3.5 runtime
pip install -r requirements.txt
the requirement pkg-resources cannot be found.
pkg-resources is not to be found as a package. it is in the setuptools package. tested by installing setuptools and could see that pkg-resources would appear along with setuptools in the site-packages folder.
needed to get an environment variable set in the apache/conf/httpd.conf into the flask application.
SetEnv MYAPP_CONFIG prod
Passing Apache Environment Variables to Django via mod_wsgi
import os
from htdocs import webfaction
def application(environ, start_response):
"""
transport any environment variables from the apache
system into the flask wsgi application space
"""
for key in environ:
if key.startswith('MYAPP_'):
os.environ[key] = environ[key]
# import the flask application
from myapp.main import app
# load some middleware to append the current appname to /
app.wsgi_app = webfaction.Middleware(app.wsgi_app)
return app(environ, start_response)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.