Blog Archives

Virtualenv Bash Shell Function

By default, virtualenv uses /usr/bin/python. I find this a pain because I run the latest Python out of /usr/local/bin. Each time I create a new virtualenv environment, I need to type: virtualenv -p /usr/local/bin/python {env} If you use Bash, create

Tagged with: , ,
Posted in Computing, Programming, Python

Python Under the Hood: A simple generic model, part 1

Tonight I was digging through the SQLAlchemy and SQLSoup source code to help figure out what I’m doing wrong with my object mapping for in-memory sqlite. While doing this, I figured out how to make a very simple but powerful

Tagged with:
Posted in Computing, Programming, Python Unknown command: ‘createsuperuser’

tl;dr When you need to create a superuser, the official Django documentation says to run createsuperuser. Instead, run the following: $ python createsuperuser The Details While putting together a tutorial for Django, I started to explore how a project

Tagged with: , , , ,
Posted in Computing, Django, Programming, Python, Web Frameworks

Dict (Dictionary) Comprehensions in Python

In my never ending quest to grok Python and do more while writing less code, I came across dict (dictionary) comprehensions. See PEP 274. Dict comprehensions are the dictionary analog to list comprehensions. This post provides a simple problem space,

Tagged with: , ,
Posted in Computing, Python

Django Boston – User Authentication

Last night was my first Django Boston meetup. Max Uhlenhuth, one of the organizers, greeted me as I arrived. We chatted for a bit before the talks started. First up: Eddy Wong, CTO of Wanderu (who provided the space and bought pizza), gave

Tagged with: , , ,
Posted in Computing, Python, Web Frameworks