diff --git a/example/example/settings.py b/example/example/settings.py index ba6dd66..9e5d174 100644 --- a/example/example/settings.py +++ b/example/example/settings.py @@ -200,7 +200,7 @@ LOGGING = { import django -if django.VERSION[0] >= 1 and django.VERSION[1] >= 4: +if django.VERSION[0] == 1 and django.VERSION[1] >= 4: TEMPLATE_CONTEXT_PROCESSORS += ('django.core.context_processors.tz',) LOGGING['filters'] = { 'require_debug_false': { diff --git a/example/run_tests.py b/example/run_tests.py index ba31e54..b91dc12 100644 --- a/example/run_tests.py +++ b/example/run_tests.py @@ -30,11 +30,11 @@ if len(sys.argv) == 1: else: os.environ[ENVIRONMENT_VARIABLE] = sys.argv[1] -if django.VERSION[0] >= 1 and django.VERSION[1] >= 7: +if django.VERSION[0] == 1 and django.VERSION[1] >= 7: from django.core.wsgi import get_wsgi_application application = get_wsgi_application() -if django.VERSION[0] >= 1 and django.VERSION[1] <= 5: +if django.VERSION[0] == 1 and django.VERSION[1] <= 5: management.call_command('test', 'app') else: management.call_command('test', 'example.app') diff --git a/multiselectfield/db/fields.py b/multiselectfield/db/fields.py index c19e340..7e065a0 100644 --- a/multiselectfield/db/fields.py +++ b/multiselectfield/db/fields.py @@ -78,7 +78,7 @@ class MultiSelectField(models.CharField): arr_choices = self.get_choices_selected(self.get_choices_default()) for opt_select in value: if (opt_select not in arr_choices): - if django.VERSION[0] >= 1 and django.VERSION[1] >= 6: + if django.VERSION[0] == 1 and django.VERSION[1] >= 6: raise exceptions.ValidationError(self.error_messages['invalid_choice'] % {"value": value}) else: raise exceptions.ValidationError(self.error_messages['invalid_choice'] % value)