neutrinog/django-survey — pull request #1 by datakid (2012-12-07 01:59:34+00:00)
Title: Django 1.4 changes

Found some small errors when running with Django 1.4. May be more out there, but these were the first two that slowed me down, and it seems to be working now.

1. ADMIN_MEDIA_PREFIX / STATIC_URL
In forms.py there are references to ADMIN_MEDIA_PREFIX which needed to be changed to
STATIC_URL and have the url ../js/.. replaced with ../admin/js/..

This is as per Django 1.4 release notes: https://docs.djangoproject.com/en/1.4/releases/1.4/#django-contrib-admin

2. There was a timezone comparison error, as described here: https://docs.djangoproject.com/en/1.4/topics/i18n/timezones/#troubleshooting

A simple fix to import django.utils.timezone and replace datetime.now() with timezone.now() in models.py