Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade django from 1.8 to 1.11 #33

Closed
4 tasks done
chouseknecht opened this issue Oct 13, 2017 · 3 comments
Closed
4 tasks done

Upgrade django from 1.8 to 1.11 #33

chouseknecht opened this issue Oct 13, 2017 · 3 comments
Assignees

Comments

@chouseknecht
Copy link
Contributor

chouseknecht commented Oct 13, 2017

From @cutwater on October 11, 2017 11:45

Action items:

  • Replace patterns() with lists of urls.
    > django.conf.urls.patterns() is deprecated and will be removed in Django 1.10.
    Fixed in Drop deprecated patterns() function usage #200

  • Replace string views with callables.
    > Support for string view arguments to url() is deprecated and will be removed in Django 1.10.
    Fixed in Drop deprecated patterns() function usage #200

  • Replace usage of django.utils.importlib
    Remove django-site-maintenance dependency.
    > django.utils.importlib will be removed in Django 1.9.

  • Upgrade djangorestframework

More changes to be added.

Copied from original issue: ansible/galaxy-issues#294

@cutwater
Copy link
Collaborator

cutwater commented Nov 22, 2017

Replace usage of django.utils.importlib

Deprecation warning comes from maintanance python library. As far as we don't use it, we can safely remove it in order to upgrade to Django 1.11.

@cutwater
Copy link
Collaborator

cutwater commented Nov 22, 2017

Latest drt-haystack==1.6.1 doesn't support django 1.11.
We use version 1.5.6 which fails with exception:

Traceback (most recent call last):
  File "/var/lib/galaxy/venv/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/var/lib/galaxy/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "/var/lib/galaxy/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
...
  File "/var/lib/galaxy/venv/lib/python2.7/site-packages/rest_framework/serializers.py", line 363, in fields
    for key, value in self.get_fields().items():
  File "/var/lib/galaxy/venv/lib/python2.7/site-packages/drf_haystack/serializers.py", line 154, in get_fields
    kwargs = self._get_default_field_kwargs(model, field_type)
  File "/var/lib/galaxy/venv/lib/python2.7/site-packages/drf_haystack/serializers.py", line 79, in _get_default_field_kwargs
    if field.model_attr in model._meta.get_all_field_names():
AttributeError: 'Options' object has no attribute 'get_all_field_names'

Should be resolved after #193.

@cutwater
Copy link
Collaborator

cutwater commented Mar 8, 2018

Fixed by #351

@cutwater cutwater closed this as completed Mar 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants