1. Weston Nielson
  2. django-chronograph
  3. Issues
Issue #30 new

Job model not 1.5 compatible

Anonymous created an issue

Comments (1)

  1. richard_corden

    I'm not sure if this is the correct fix but the following appears to be working for me:

    $>hg diff models.py diff -r f561106f6aaa chronograph/models.py --- a/chronograph/models.py Tue Mar 05 17:39:27 2013 -0500 +++ b/chronograph/models.py Sun Jun 16 18:25:08 2013 +0100 @@ -1,4 +1,3 @@ -from django.contrib.auth.models import User from django.conf import settings from django.core.management import call_command from django.db import models @@ -24,6 +23,13 @@ from StringIO import StringIO from threading import Thread

    +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() + logger = logging.getLogger('chronograph.models')

    RRULE_WEEKDAY_DICT = {"MO":0,"TU":1,"WE":2,"TH":3,"FR":4,"SA":5,"SU":6}

  2. Log in to comment