diff --git a/orchestra/admin/utils.py b/orchestra/admin/utils.py index 904df2f2..9c485d2a 100644 --- a/orchestra/admin/utils.py +++ b/orchestra/admin/utils.py @@ -94,7 +94,7 @@ def change_url(obj): if obj is not None: cls = type(obj) opts = obj._meta - if cls._deferred: + if cls is models.DEFERRED: opts = cls.__base__._meta view_name = 'admin:%s_%s_change' % (opts.app_label, opts.model_name) return reverse(view_name, args=(obj.pk,)) diff --git a/orchestra/api/options.py b/orchestra/api/options.py index 0620d9c7..8b377564 100644 --- a/orchestra/api/options.py +++ b/orchestra/api/options.py @@ -59,7 +59,7 @@ class LogApiMixin(object): class LinkHeaderRouter(DefaultRouter): - def get_api_root_view(self): + def get_api_root_view(self, api_urls=None): """ returns the root view, with all the linked collections """ APIRoot = import_class(settings.ORCHESTRA_API_ROOT_VIEW) APIRoot.router = self diff --git a/orchestra/bin/orchestra-admin b/orchestra/bin/orchestra-admin index b480490e..22a26e72 100755 --- a/orchestra/bin/orchestra-admin +++ b/orchestra/bin/orchestra-admin @@ -161,7 +161,7 @@ function install_requirements () { coverage \ flake8 \ django-debug-toolbar==1.3.0 \ - django-nose==1.4 \ + django-nose==1.4.4 \ sqlparse \ pyinotify \ PyMySQL" diff --git a/orchestra/contrib/bills/models.py b/orchestra/contrib/bills/models.py index 5e2896a0..02f0b386 100644 --- a/orchestra/contrib/bills/models.py +++ b/orchestra/contrib/bills/models.py @@ -124,7 +124,7 @@ class Bill(models.Model): @classmethod def get_class_type(cls): - if cls._deferred: + if cls is models.DEFERRED: cls = cls.__base__ return cls.__name__.upper() @@ -227,7 +227,7 @@ class Bill(models.Model): def get_number(self): cls = type(self) - if cls._deferred: + if cls is models.DEFERRED: cls = cls.__base__ bill_type = self.get_type() if bill_type == self.BILL: diff --git a/orchestra/contrib/systemusers/apps.py b/orchestra/contrib/systemusers/apps.py index 021d92d9..e0db6346 100644 --- a/orchestra/contrib/systemusers/apps.py +++ b/orchestra/contrib/systemusers/apps.py @@ -19,7 +19,7 @@ class SystemUsersConfig(AppConfig): def create_initial_systemuser(self, **kwargs): from .models import SystemUser - Account = SystemUser.account.field.related.model + Account = SystemUser.account.field.remote_field.model for account in Account.objects.filter(is_superuser=True, main_systemuser_id__isnull=True): systemuser = SystemUser.objects.create(username=account.username, password=account.password, account=account) diff --git a/orchestra/models/fields.py b/orchestra/models/fields.py index 8d892762..44331180 100644 --- a/orchestra/models/fields.py +++ b/orchestra/models/fields.py @@ -51,7 +51,7 @@ class MultiSelectField(models.CharField): def validate(self, value, model_instance): if self.choices: - arr_choices = self.get_choices_selected(self.get_choices_default()) + arr_choices = self.get_choices_selected(self.get_choices()) for opt_select in value: if (opt_select not in arr_choices): msg = self.error_messages['invalid_choice'] % {'value': opt_select} diff --git a/requirements.txt b/requirements.txt index e53bb8f7..b4b0a0b7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,13 @@ Django==1.9.5 django-fluent-dashboard==0.6.1 -django-admin-tools==0.7.2 +django-admin-tools==0.8.0 django-extensions==1.7.4 django-celery==3.1.17 celery==3.1.23 kombu==3.0.35 billiard==3.3.0.23 Markdown==2.4 -djangorestframework==3.3.2 +djangorestframework==3.4.7 ecdsa==0.11 Pygments==1.6 django-filter==0.7