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

Time with family and practice smoking meat

No real blog post this weekend. Instead, spending more time with family and learning to use my smoker grill. What you see are pork ribs and a pork loin cut in half.

Posted in Cuisine

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

How old is that salsa in the fridge?

You pull a jar of salsa out of the fridge. You don’t remember when you opened it up. A week ago, 2 months? maybe 3? I used to run into this problem more than I liked. We’d throw out food

Tagged with: ,
Posted in Cuisine

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