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

Django 1.10 incompatibility #72

Open
karolyi opened this issue Aug 2, 2016 · 7 comments
Open

Django 1.10 incompatibility #72

karolyi opened this issue Aug 2, 2016 · 7 comments

Comments

@karolyi
Copy link

karolyi commented Aug 2, 2016

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'
@koliyo
Copy link

koliyo commented Aug 3, 2016

I use this as a temporary fix:

TEMPLATE_LOADERS = TEMPLATES[0]['OPTIONS']['loaders']

@karolyi
Copy link
Author

karolyi commented Aug 3, 2016

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

@gregmuellegger
Copy link
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.

morvan pushed a commit to morvan/django-mobile that referenced this issue Aug 31, 2016
@deltaGPhys
Copy link

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

@tsouvarev
Copy link

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"

@tony
Copy link

tony commented Aug 8, 2017

@gregmuellegger Are you still maintaining this project?

@tkh
Copy link

tkh commented Nov 12, 2017

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants