Generating https urls in Django using CloudFront

Configure CloudFront to set the Cloudfront-Forwarded-Proto in order to allow a Django application to know the client’s request protocol.…

Keep reading

Taming PYTHONPATH in PyCharm and IntelliJ

PyCharm and IntelliJ have some odd defaults that can mask mistakes until they hit CI.…

Keep reading

Using pyenv and pyenv-virtualenv on OSX

Until recently I relied on OS X native python for anything 2.7.x and Homebrew’s python3 for anything 3.x.x. As already implied by the lots of ‘x’-es: Far from ideal. But it worked. Until I accidentally ran a brew upgrade which put my python 3 version to a bleeding edge 3.6.0. Newer than what’s provisioned on our stack and besides that I ran into some errors when installing requirements in a new virtualenv that I suspected to be related to the python version bump.…

Keep reading