Tutorial
« Previous EntriesPainless Amazon EC2 Backup
Friday, March 13th, 2009The past year on Amazon EC2 has taught me many things but first and foremost is back up consistently. I’ll say it again, back up consistently! Amazon even makes the backup almost painless, almost…
Amazon has EC2 (the compute cloud) and S3 (the data repository). Out of the box you can back up from [...]
Clearing Django Form Fields One By One
Wednesday, December 10th, 2008I just spent an hour looking all over the web for something everyone assumes everyone else already knows. If you’re new to Django and you’re trying to clear a form field on validation then the solution is not intuitive.
Take a common scenario, you have a CAPTACHA image and the user enters it incorrectly, next [...]
Custom Actions In Django Admin Object Editor
Tuesday, October 7th, 2008I’ve seen many posts asking for the simplest feature in Django admin… the ability to add custom actions next to History and View On Site in the Django admin form. The page where the actual object is edited, not the list pages. Imagine adding actions like:
Edit Next Item
Edit Previous Item
Send Thank You Email
Export [...]
PayPal IPN Python Code
Thursday, October 2nd, 2008PayPal has Instant Payment Notification (IPN) libraries with examples for Perl, Java, and even Ruby, but look as hard as I may none for Python. Then again I spent 2 years at PayPal as a senior developer, C++ and Java are the dominant languages. Django and Rails are not even on the radar [...]
Django Tips: UTF-8, ASCII Encoding Errors, Urllib2, and MySQL
Wednesday, September 24th, 2008Having completed many Django projects over the past two years, I’ve started to take some seemingly trivial things for granted. Cross referencing a project for one of these solutions a few days back made me realize that these things are not trivial to others. I remember looking through countless pags and forums for [...]
Porting Aware To Django
Monday, August 25th, 2008A few years back I started a PC profiling service known as Aware Labs. It was originally written in C++ with a Windows MFC downloadable client. Six months ago I re-wrote the static website front end in Django so I could get a better handle on news and static updates. Today I’m [...]
OneToOne Fields And The Primary Key Issue
Monday, June 23rd, 2008Django provides one-many ForeignKey, many-many ManyToManyField, and one-one OneToOneField options for defining table relationships. The OneToOneField specifically has recently been the topic of heated debates and ideas. Unlike the other options this field is by always constrained to be a “Primary Key”. The restriction implies that each table may ONLY have one [...]
Amazon EC2 Basics For The Curious
Tuesday, June 3rd, 2008For those of you wondering what it would be like to host and maintain a Django application (or any application) on Amazon’s Elastic Computing Cloud (EC2) here is a basic list of daily operations. These steps assume you’ve set up your Amazon account. This is the basic set of commands you can use [...]
Installing MySQLdb Without Python Egg Problems
Saturday, May 31st, 2008When installing Django sooner or later you will come across a system that needs MySQLdb and sooner or later you will see the following error:
[Sat May 31 19:43:19 2008] [error] [client 99.165.134.196] PythonHandler django.core.handlers.modpython: ExtractionError: Can’t extract file(s) to egg cache\n\nThe following error occurred while trying to extract file(s) to the Python egg\ncache:\n\n [Errno [...]
Authenticating Using Email vs Username
Sunday, May 18th, 2008A few weeks back I posted the full source for user logins and password recovery under Everything A Django Developer Needs To Create Logins. There was a little bit of flack from some very passionate and smart individuals (James Bennet) insisting that this middle ware already exists in "contrib.auth;". On the other hand [...]
« Previous Entries