Upgraded to django 1.10.x
This commit is contained in:
parent
c10e8dd793
commit
ec53d357f6
|
@ -94,7 +94,7 @@ def change_url(obj):
|
||||||
if obj is not None:
|
if obj is not None:
|
||||||
cls = type(obj)
|
cls = type(obj)
|
||||||
opts = obj._meta
|
opts = obj._meta
|
||||||
if cls._deferred:
|
if cls is models.DEFERRED:
|
||||||
opts = cls.__base__._meta
|
opts = cls.__base__._meta
|
||||||
view_name = 'admin:%s_%s_change' % (opts.app_label, opts.model_name)
|
view_name = 'admin:%s_%s_change' % (opts.app_label, opts.model_name)
|
||||||
return reverse(view_name, args=(obj.pk,))
|
return reverse(view_name, args=(obj.pk,))
|
||||||
|
|
|
@ -59,7 +59,7 @@ class LogApiMixin(object):
|
||||||
|
|
||||||
|
|
||||||
class LinkHeaderRouter(DefaultRouter):
|
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 """
|
""" returns the root view, with all the linked collections """
|
||||||
APIRoot = import_class(settings.ORCHESTRA_API_ROOT_VIEW)
|
APIRoot = import_class(settings.ORCHESTRA_API_ROOT_VIEW)
|
||||||
APIRoot.router = self
|
APIRoot.router = self
|
||||||
|
|
|
@ -161,7 +161,7 @@ function install_requirements () {
|
||||||
coverage \
|
coverage \
|
||||||
flake8 \
|
flake8 \
|
||||||
django-debug-toolbar==1.3.0 \
|
django-debug-toolbar==1.3.0 \
|
||||||
django-nose==1.4 \
|
django-nose==1.4.4 \
|
||||||
sqlparse \
|
sqlparse \
|
||||||
pyinotify \
|
pyinotify \
|
||||||
PyMySQL"
|
PyMySQL"
|
||||||
|
|
|
@ -124,7 +124,7 @@ class Bill(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_class_type(cls):
|
def get_class_type(cls):
|
||||||
if cls._deferred:
|
if cls is models.DEFERRED:
|
||||||
cls = cls.__base__
|
cls = cls.__base__
|
||||||
return cls.__name__.upper()
|
return cls.__name__.upper()
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ class Bill(models.Model):
|
||||||
|
|
||||||
def get_number(self):
|
def get_number(self):
|
||||||
cls = type(self)
|
cls = type(self)
|
||||||
if cls._deferred:
|
if cls is models.DEFERRED:
|
||||||
cls = cls.__base__
|
cls = cls.__base__
|
||||||
bill_type = self.get_type()
|
bill_type = self.get_type()
|
||||||
if bill_type == self.BILL:
|
if bill_type == self.BILL:
|
||||||
|
|
|
@ -19,7 +19,7 @@ class SystemUsersConfig(AppConfig):
|
||||||
|
|
||||||
def create_initial_systemuser(self, **kwargs):
|
def create_initial_systemuser(self, **kwargs):
|
||||||
from .models import SystemUser
|
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):
|
for account in Account.objects.filter(is_superuser=True, main_systemuser_id__isnull=True):
|
||||||
systemuser = SystemUser.objects.create(username=account.username,
|
systemuser = SystemUser.objects.create(username=account.username,
|
||||||
password=account.password, account=account)
|
password=account.password, account=account)
|
||||||
|
|
|
@ -51,7 +51,7 @@ class MultiSelectField(models.CharField):
|
||||||
|
|
||||||
def validate(self, value, model_instance):
|
def validate(self, value, model_instance):
|
||||||
if self.choices:
|
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:
|
for opt_select in value:
|
||||||
if (opt_select not in arr_choices):
|
if (opt_select not in arr_choices):
|
||||||
msg = self.error_messages['invalid_choice'] % {'value': opt_select}
|
msg = self.error_messages['invalid_choice'] % {'value': opt_select}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
Django==1.9.5
|
Django==1.9.5
|
||||||
django-fluent-dashboard==0.6.1
|
django-fluent-dashboard==0.6.1
|
||||||
django-admin-tools==0.7.2
|
django-admin-tools==0.8.0
|
||||||
django-extensions==1.7.4
|
django-extensions==1.7.4
|
||||||
django-celery==3.1.17
|
django-celery==3.1.17
|
||||||
celery==3.1.23
|
celery==3.1.23
|
||||||
kombu==3.0.35
|
kombu==3.0.35
|
||||||
billiard==3.3.0.23
|
billiard==3.3.0.23
|
||||||
Markdown==2.4
|
Markdown==2.4
|
||||||
djangorestframework==3.3.2
|
djangorestframework==3.4.7
|
||||||
ecdsa==0.11
|
ecdsa==0.11
|
||||||
Pygments==1.6
|
Pygments==1.6
|
||||||
django-filter==0.7
|
django-filter==0.7
|
||||||
|
|
Loading…
Reference in New Issue