Better support for django 1.5 custom user models: rather than importing User from django.contrib.auth.models, first try to get the user model using get_user_model().
But this doesn't work in models.py, so using the string from settings for that file - this breaks one place.
Also, username doesn't necessarily exist anymore - some spots noted where this occurs
non-working strftime() replaced with isoformat()