Skip to content

Django 1.10 incompatibility #72

Open

Description

@karolyi

Hey,

I just upgraded to Django 1.10, and here's the startup error:

Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "xxx/venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
    utility.execute()
  File "xxx/venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 341, in execute
    django.setup()
  File "xxx/venv/lib/python3.5/site-packages/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "xxx/venv/lib/python3.5/site-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "xxx/venv/lib/python3.5/site-packages/django/apps/config.py", line 90, in create
    module = import_module(entry)
  File "/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 665, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "xxx/venv/lib/python3.5/site-packages/django_mobile/__init__.py", line 10, in <module>
    from django_mobile.conf import settings
  File "xxx/venv/lib/python3.5/site-packages/django_mobile/conf.py", line 23, in <module>
    class defaults(object):
  File "xxx/venv/lib/python3.5/site-packages/django_mobile/conf.py", line 33, in defaults
    for loader in django_settings.TEMPLATE_LOADERS:
  File "xxx/venv/lib/python3.5/site-packages/django/conf/__init__.py", line 54, in __getattr__
    return getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'TEMPLATE_LOADERS'

Activity

  1. koliyo commented on Aug 3, 2016

    @koliyo

    I use this as a temporary fix:

    TEMPLATE_LOADERS = TEMPLATES[0]['OPTIONS']['loaders']
    
  2. karolyi commented on Aug 3, 2016

    @karolyi
    Author

    yeah, I did that too, but still, it's deprecated.

  3. gregmuellegger commented on Aug 15, 2016

    @gregmuellegger
    Owner

    Hey thanks for the report! I'm not actively using django-mobile in any project currently, so I won't fix this any time soon. But I'm very happy about any PRs if you want to try and tackle the problem.

  4. added a commit that references this issue on Aug 31, 2016
  5. deltaGPhys commented on Sep 3, 2016

    @deltaGPhys

    Does the commit above mean that this package is now compatible with 1.10?

  6. tsouvarev commented on Oct 6, 2016

    @tsouvarev

    Worth noting that approach with TEMPLATE_LOADERS = TEMPLATES[0]['OPTIONS']['loaders'] may be too naive, because you can use Jinja as first template engine, which doesn't have loaders section at all. Better way is to look up NAME == "django"

  7. tony commented on Aug 8, 2017

    @tony

    @gregmuellegger Are you still maintaining this project?

  8. tkh commented on Nov 12, 2017

    @tkh

    To anyone landing here who use more recent versions of Django, you might have some luck here:
    https://github.com/selwin/django-user_agents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions