question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does not work with Django 1.10

See original GitHub issue

Hello,

I was testing if I can use Django 1.10 in a project I’m working right now, but seems that the removal of ._defered attribute in Django 1.10 broke django-modeltranslation.

I tried to see if it was a quick fix but seems you rely a lot on deferred fields so I’m not the best person to fix it =(

Here is my traceback:

» python manage.py runserver
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x10a54c378>
Traceback (most recent call last):
  File "/Volumes/DADOS/Work/ambientes/fuji/lib/python3.5/site-packages/django/utils/autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "/Volumes/DADOS/Work/ambientes/fuji/lib/python3.5/site-packages/django/core/management/commands/runserver.py", line 113, in inner_run
    autoreload.raise_last_exception()
  File "/Volumes/DADOS/Work/ambientes/fuji/lib/python3.5/site-packages/django/utils/autoreload.py", line 249, in raise_last_exception
    six.reraise(*_exception)
  File "/Volumes/DADOS/Work/ambientes/fuji/lib/python3.5/site-packages/django/utils/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/Volumes/DADOS/Work/ambientes/fuji/lib/python3.5/site-packages/django/utils/autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "/Volumes/DADOS/Work/ambientes/fuji/lib/python3.5/site-packages/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/Volumes/DADOS/Work/ambientes/fuji/lib/python3.5/site-packages/django/apps/registry.py", line 115, in populate
    app_config.ready()
  File "/Volumes/DADOS/Work/ambientes/fuji/lib/python3.5/site-packages/modeltranslation/apps.py", line 11, in ready
    handle_translation_registrations()
  File "/Volumes/DADOS/Work/ambientes/fuji/lib/python3.5/site-packages/modeltranslation/models.py", line 81, in handle_translation_registrations
    autodiscover()
  File "/Volumes/DADOS/Work/ambientes/fuji/lib/python3.5/site-packages/modeltranslation/models.py", line 32, in autodiscover
    import_module(module)
  File "/Volumes/DADOS/Work/ambientes/fuji/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 "/Volumes/DADOS/Work/sandbox/enjbrasil/fuji/apps/commons/translation.py", line 6, in <module>
    class CountryTranslationOptions(TranslationOptions):
  File "/Volumes/DADOS/Work/ambientes/fuji/lib/python3.5/site-packages/modeltranslation/decorators.py", line 23, in wrapper
    translator.register(model_or_iterable, opts_class, **options)
  File "/Volumes/DADOS/Work/ambientes/fuji/lib/python3.5/site-packages/modeltranslation/translator.py", line 427, in register
    opts = self._get_options_for_model(model, opts_class, **options)
  File "/Volumes/DADOS/Work/ambientes/fuji/lib/python3.5/site-packages/modeltranslation/translator.py", line 547, in _get_options_for_model
    if model._deferred:
AttributeError: type object 'Country' has no attribute '_deferred'

Any ideas?

Thanks for your project, it’s amazing =)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:8
  • Comments:36 (6 by maintainers)

github_iconTop GitHub Comments

14reactions
zlorfcommented, Aug 19, 2016

All test are passing on all Django versions. Probably I still need to add one more test and fix two recent issues, so by the end of the week a Django 1.10-compatible version will be released.

6reactions
deschlercommented, Sep 21, 2016

Made the release yesterday. Closing here. Thanks everyone!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Django 1.10 release notes
Like Django 1.9, Django 1.10 requires Python 2.7, 3.4, or 3.5. We highly recommend and only officially support the latest release of each...
Read more >
Django 1.10 is not detecting changes in my models, and won't ...
The situation I now seem to be in is that Django refuses to notice changes in my models.py . Currently, there are no...
Read more >
django 1.10 error (SSL error: called a function you should not ...
The problem occurs when REST api (made using django-rest-framework) is called by a Angular2 app. I have activated the following settings:
Read more >
Creating Django Project - Django 1.10 Tutorial - OverIQ.com
You have 13 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions. Run...
Read more >
[Solved]-Django 1.10.6 - Middleware does not work-django
Related Query · Does Django message middleware not work with app engine? · Django 1.10. · CSRF validation does not work on Django...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found