From a414ca1ec8ad98f0c24c354d3ca48513cb6cb15f Mon Sep 17 00:00:00 2001 From: Matteo Atti Date: Fri, 20 Apr 2012 14:21:08 +0200 Subject: [PATCH] fix bad import for Django 1.3 and fixed save() with args in RunInfo models --- questionnaire/models.py | 6 +++--- questionnaire/qprocessors/range.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/questionnaire/models.py b/questionnaire/models.py index 591ccc8..0002027 100644 --- a/questionnaire/models.py +++ b/questionnaire/models.py @@ -167,9 +167,9 @@ class RunInfo(models.Model): help_text=u"A comma sepearted list of questions to skip" ) - def save(self): + def save(self, **kwargs): self.random = (self.random or '').lower() - super(RunInfo, self).save() + super(RunInfo, self).save(**kwargs) def set_cookie(self, key, value): "runinfo.set_cookie(key, value). If value is None, delete cookie" @@ -386,4 +386,4 @@ class Answer(models.Model): def check_answer(self): "Confirm that the supplied answer matches what we expect" - return True \ No newline at end of file + return True diff --git a/questionnaire/qprocessors/range.py b/questionnaire/qprocessors/range.py index 29b9b9b..f2ee22b 100644 --- a/questionnaire/qprocessors/range.py +++ b/questionnaire/qprocessors/range.py @@ -1,5 +1,5 @@ from questionnaire import * -from django.conf.urls.static import settings +from django.conf import settings from django.utils.translation import ugettext as _ from django.utils.simplejson import dumps @@ -80,4 +80,4 @@ def digits(number): else: return len(number.split(',')[1]) else: - return 0 \ No newline at end of file + return 0