Archive for the ‘Programming & Internet’ Category

How to Reset a Django Admin Password

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. >>> [...]

March 6, 2012 · Dustin · 10 Comments
Tags: , ,  Â· Posted in: Programming & Internet

Herniated L5-S1 Disc

I thought I’d share the story of how I herniated a disc in my back to hopefully education some programmers out there on why it is important to get up, stretch, work out, drink water, and all that healthy jazz you hear people talk about. Getting in the zone is great, but as you get [...]

January 26, 2012 · Dustin · 10 Comments
Tags: ,  Â· Posted in: Programming & Internet, Yada

My Django Dev Environment: Virtualenv, pip, git, & PyCharm

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 [...]

October 14, 2011 · Dustin · 8 Comments
Tags: , , , , ,  Â· Posted in: Programming & Internet

How Sports Improves Programmer Focus

There was some talk recently about distractions at work. Guys were complaining they can’t get anything done with so many distractions. We used to have an open work space where you could see and hear everyone in the room. Now we have higher cubicle walls. Personally, I preferred the old layout. When a someone tells me they can’t focus [...]

June 17, 2011 · Dustin · No Comments
Posted in: Programming & Internet

Django Color Theme for PyCharm

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 [...]

June 6, 2011 · Dustin · 13 Comments
Tags: , ,  Â· Posted in: Programming & Internet

Python IRC Bot Using Twisted (Rollbot)

I wrote my first IRC bot recently. It turned out to be a simpler task than I thought it would be. Here’s the back story: At work, our programming team uses an IRC channel for all our internal communication throughout the day. What more would you expect from a bunch of programmers? Recently I’ve been [...]

April 28, 2011 · Dustin · 16 Comments
Tags: , , , , , ,  Â· Posted in: Programming & Internet

Top 10 Productivity Tips

Need to stop procrastinating and get something done? Follow these steps to help you get your task complete ASAP! Check your email. There might be an important message you need to read. Until you have read all your email, your mind will not be clear enough to get anything done. Open Twitter and read through [...]

April 18, 2011 · Dustin · 24 Comments
Posted in: Programming & Internet

The Problem with Buying Templates

A while back I bought a template from themeforest.net. After modifying it and implementing it on my site, my search engine rankings started to drop. I didn’t think much of it as first, but then I noticed that even searching from my domain name didn’t show my main page, instead, it would link to somewhere [...]

March 28, 2011 · Dustin · 12 Comments
Tags: , , , ,  Â· Posted in: Programming & Internet

Django smart_unicode

So my QA guy is putting an app through the ringer and presented me with the following error on a page: Caught UnicodeEncodeError while rendering: (‘ascii’, u’Utf8-\u010a\u010e\ufffd”\u0117′, 5, 8, ‘ordinal not in range(128)’) For some reason I thought UTF8 characters Just Worked™ in Django, but that was a bad assumption. The problem came from my [...]

March 11, 2011 · Dustin · 7 Comments
Tags: , , , ,  Â· Posted in: Programming & Internet

jQuery UI Dialog: OK click on Enter key

I use the jQuery dialog a lot on the inzolo budget screen. It often contains small forms. After entering the form data it is natural to hit enter and expect it to submit the form. The OK button is set to post the form data via ajax. Thanks to this stackoverflow post I found a [...]

March 9, 2011 · Dustin · 6 Comments
Tags: , ,  Â· Posted in: Programming & Internet