add compat.py to support django 1.5 changes.
Merge pull request #15 from gkmngrgn/django1.5-compatibility

add compat.py to support django 1.5 changes.