Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #35 from Jumpstartz/master

Django 1.5 support
  • Loading branch information...
commit af3e67f97e61306b5bc1aadc90539de39b384b04 2 parents f4218ce + 463f674
@jonathanslenders jonathanslenders authored
Showing with 10 additions and 1 deletion.
  1. +10 −1 django_states/log.py
View
11 django_states/log.py
@@ -1,7 +1,16 @@
# -*- coding: utf-8 -*-
"""log model"""
-from django.contrib.auth.models import User
+"""
+Suport for Django 1.5 custom user model.
+"""
+try:
+ from django.contrib.auth import get_user_model
+except ImportError: # django < 1.5
+ from django.contrib.auth.models import User
+else:
+ User = get_user_model()
+
from django.db import models
from django.db.models.base import ModelBase
from django.utils.translation import ugettext_lazy as _
Please sign in to comment.
Something went wrong with that request. Please try again.