Brandon Konkle
Brandon Konkle

Freelance full-stack Node & React developer, supporter of intersectional social justice, enthusiastic nerd, loving husband, and father. Hire me for your next project!

My Newsletter


Subscribe to my newsletter for a weekly look at the latest news, tools, and techniques from the React community.

Tags


Twitter


Brandon Konkle

Django

uWSGI and Django Secure Requests

A colleague and I ran into a frustrating situation this evening when transitioning a site from Apache and modwsgi to uWSGI. Django's request.is_secure() wasn't working correctly. After much Googling and shouting at the SSH console, we finally discovered the UWSGISCHEME uWSGI parameter. To fix the issue, we edited /etc/nginx/uwsgiparams…

Brandon KonkleBrandon Konkle

Class-based Views with Django-Baseviews

I've always loved the concept of class-based views because views often become repetitive. There are a lot of common operations in a view that work best when they are defined once and reused. Class inheritance, in my opinion, is the best way to keep views DRY and allow you to focus on what makes each view different. At first, I used to b…

Brandon KonkleBrandon Konkle

Django on uWSGI and Nginx

I recently moved Pegasus News from Perlbal, Lighttpd, and Apache to Nginx and uWSGI. We balance the traffic between 3 physical servers, and the systems were struggling under the load even after weeks of Apache conf tweaking. We began having issues with excessively slow page loads, request timeouts, and intermittent errors with OGR trans…

Brandon KonkleBrandon Konkle

Setting up a template_postgis on Lucid

I wasn't able to find instructions in the Django docs for setting up a template_postgis database with postgis-1.5 and Postgres 8.4 on Ubuntu Lucid (10.04). Below is what worked for me. GeoDjango installed via Ubuntu 10.04 packages #!/usr/bin/env bash POSTGIS_SQL_PATH=`pg_config --sharedir`/contrib createdb -E UTF8 template_postgis # Crea…

Brandon KonkleBrandon Konkle