Have you ever wanted to give your model some month choices relating to integers 1-12. I would guess it’s pretty common – common enough to be included in django.contrib. Well, it is. Here is a quick tip on how to include it in a model:
Disclaimer: I am not a sysadmin. I’m just a developer. I welcome and encourage comments to improve this process! I have set up a couple of Django servers lately and taken copious notes that I have extracted from various sources. Below are the commands I issue to a fresh Ubuntu server install to get Django [...]
I have been tasked with updating our real-time revenue stats at Neutron. After spending about a week going though and updating our PHP scripts I finally decided it would be worth my time and sanity to start from scratch with Python. I’m building a Django application that will store revenue stats from different sources, which [...]
I’ve been putting some time into updating an old site this weekend. I noticed that the homepage was taking a long time to load – around 5 to 8 seconds. Not good. I tried caching queries but it didn’t help at all. Then I realized it was most likely due to my decision long ago [...]
If you are hosting a Django site, Sentry will make your life easier. After my review of various hosting companies I decided to put EnvelopeBudget.com on Webfaction. But, I was still impressed with Digital Ocean so I kept my virtual server. Why not? It’s only $5 per month for full root access! Because all their [...]
Where do you fit on this scale? Sysadmin -> DBA -> Backend Programmer -> Frontend Programmer -> Designer I have a range in the middle, but lack on each end of the spectrum. So when it comes to setting up a hosting server, I’d rather turn it over to someone more experienced in the sysadmin [...]
I got a somewhat unique request on a project the other day. My client has a lead tracking system where his salesman input leads and often upload scanned documents to include with the leads. I implemented this all with standard Django forms and a formset wizard to input multiple files. My client was worried that [...]
This is just a quick post to give a tip on how to recover or reset your Django admin username and/or password. Use your django shell to query the User model. $ python manage.py shell >>> from django.contrib.auth.models import User If you can’t remember your username, you can view all users in the system. >>> [...]
Even though I’ve heard how wonderful virtualenv & pip are for managing Django development environments, I didn’t think I needed to bother learning it. But one bored day I did. I’m so glad I did. Truth is, it is just as simple and awesome as everyone says it is. And it’s been so helpful with [...]
Since I started writing Django, I’ve changed editors at least four times. In windows, I started with the TextMate clone, e. On mac I would use TextMate. Both can use a the django textmate theme. When I started using Ubuntu, I customized gedit to work like e & TextMate. I even contributed to the gedit [...]

