Django Aware

Batch Code

Painless Amazon EC2 Backup

Friday, March 13th, 2009

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

Porting Aware To Django

Monday, August 25th, 2008

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

Full Source To Instant RSS Portals Using Django

Tuesday, February 5th, 2008

My favorite Django project, Arkayne, has undergone another major enhancement. We are now offering full source code for instant RSS portals. The open source portals allow anyone to set up a site that consumes any RSS feed and produces lists of related articles. The portal is a modified reader that interfaces with [...]

All You Need For Parsing RSS Feeds

Tuesday, February 5th, 2008

I’m working on a a few applications to extend the Arkayne API and I needed a simple and easy to use RSS feed parser. It needed to tackle two issues:

Parsing any feed (or as many as possible).
Parsing any encoding (or as many as possible).

Granted one is solved by the parser while the other [...]

Connecting To Oracle Directly (Without settings.py)

Tuesday, October 23rd, 2007

I recently ran into an situation where I needed to connect to both an Oracle DB and my local DB simultaneously in Django. I was porting data between the two. After spending an hour online hunting around for how to use cx_Oracle I finally found a working example. I first got things [...]

Using Django Models In Batch Jobs

Wednesday, July 4th, 2007

If you want to run batch jobs that support your Django website the model interface is very handy. You may even use templates with this approach. Here is the basic setup to run Django applications from the command line.
batch.py

#!/home/username/lib/python2.4
import os
import sys
os.environ['DJANGO_SETTINGS_MODULE'] = ‘arkayne.settings’
sys.path.append(os.path.abspath(‘/home/someuser/django’))
sys.path.append(os.path.abspath(‘/home/someuser/lib/python2.4′))
from arkayne.arkayne.models import Page
def main(argv):
pages = Page.objects.all()
[...]