This document has now been incorporated into the uWSGI documentation:
http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html
Steps with explanations to set up a server using:
$ python3
>>> Python 3.6.4
get-pip.py
from https://bootstrap.pypa.io/get-pip.py and install (this should already be installed if python was installed from python.org or homebrew):$ curl -O https://bootstrap.pypa.io/get-pip.py
$ sudo python3 get-pip.py
$ python3
>>> Python 3.6.4
get-pip.py
from https://bootstrap.pypa.io/get-pip.py and install (this should already be installed if python was installed from python.org or homebrew):$ curl -O https://bootstrap.pypa.io/get-pip.py
$ sudo python3 get-pip.py
import email | |
def get_decoded_email_body(message_body): | |
""" Decode email body. | |
Detect character set if the header is not set. | |
We try to get text/plain, but if there is not one then fallback to text/html. | |
:param message_body: Raw 7-bit message body input e.g. from imaplib. Double encoded in quoted-printable and latin-1 |
.PHONY: test install pep8 release clean | |
test: pep8 | |
py.test --cov -l --tb=short --maxfail=1 program/ | |
install: | |
python setup.py develop | |
pep8: | |
@flake8 program --ignore=F403 --exclude=junk |
py.test test_sample.py --collect-only # collects information test suite | |
py.test test_sample.py -v # outputs verbose messages | |
py.test -q test_sample.py # omit filename output | |
python -m pytest -q test_sample.py # calling pytest through python | |
py.test --markers # show available markers |