Skip to content

Compatible with Django 1.9 #838

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

Closed
Jzarecta opened this issue Jun 9, 2016 · 13 comments
Closed

Compatible with Django 1.9 #838

Jzarecta opened this issue Jun 9, 2016 · 13 comments

Comments

@Jzarecta
Copy link

Jzarecta commented Jun 9, 2016

Is this project updated for 1.9?

@aaugustin
Copy link
Contributor

Try it?

@galuszkak
Copy link

galuszkak commented Jun 12, 2016

Hello @aaugustin! Thanks for awesome work on django-debug-toolbar.

Unfortunately this doesn't work for me with Django 1.9.7. I'm using Python 3.5 and Django 1.9.7.

What is strange when I include into INSTALLED_APPS = Base.INSTALLED_APPS + ('debug_toolbar',)

I've got hanging app. Django just freeze forever. When I cancel (Ctrl+C) the django process I got this stacktrace:

  File "/usr/local/lib/python3.5/site-packages/configurations/__init__.py", line 38, in setup
    _setup()
  File "/usr/local/lib/python3.5/site-packages/configurations/__init__.py", line 17, in _setup
    django.setup()
  File "/usr/local/lib/python3.5/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python3.5/site-packages/django/apps/registry.py", line 71, in populate
    with self._lock:

It's maybe problem related to django-configurations. Feel free to ask whatever you need to find root cause of this problem. But without debug_toolbar it works fine, so probably this is combination of this issue.

@aaugustin
Copy link
Contributor

Uh, annoying. Are you using the "explicit setup" described in the installation instructions?

@galuszkak
Copy link

No, I'm not using that.

@aaugustin
Copy link
Contributor

There's a good chance the explicit setup will resolve the problem that causes this traceback, regardless of the version of Django being use.

Apps such as django-configurations are incompatible with the magic setup.

@valignatev
Copy link
Contributor

Hi, I currently use debug-toolbar with django 1.9.7 and Python 3.5 without any issues and manual configurations so it might be collisions with another addons.

@emorozov
Copy link

Django debug toolbar is incompatible with Django 1.9 in the automatic mode, because it hangs here:

def patch_root_urlconf():
    from django.conf.urls import include, url
    from django.core.urlresolvers import clear_url_caches, reverse, NoReverseMatch
    import debug_toolbar
    try:
        reverse('djdt:render_panel')
    except NoReverseMatch:
        urlconf_module = import_module(settings.ROOT_URLCONF)
        urlconf_module.urlpatterns = [
            url(r'^__debug__/', include(debug_toolbar.urls)),
        ] + urlconf_module.urlpatterns
        clear_url_caches()

On the line reverse('djdt:render_panel').
I'm reverting back to manual setup, but this problem requires attention.

@aaugustin
Copy link
Contributor

I think the debug toolbar should drop the automagic setup.

@jdufresne
Copy link
Contributor

I think the debug toolbar should drop the automagic setup.

If this suggestion is serious, I have created PR to do so.

@aaugustin
Copy link
Contributor

Well... Let's say 80% serious.

I actually believe that the automagic setup isn't a tractable concept.

But I'm not eager to take responsibility for removing it and deal with frustrated users.

@jdufresne
Copy link
Contributor

What about using a deprecation path, similar to Django's strategy? We could deprecate the automatic setup for the next release with a loud warning, and remove in the following (or later) release.

@valignatev
Copy link
Contributor

I personally agree. Because with Django 1.10 automatic setup definitely doesn't work. I suppose because of new style middleware?

@SalahAdDin
Copy link

Have problems with automatic setup, but doesn't crash with it.

ryneeverett pushed a commit to ryneeverett/django-debug-toolbar that referenced this issue Oct 2, 2016
The middleware check was moved to apps.py and changed to use the system
checks framework. It was updated to check MIDDLEWARE in addition to
MIDDLEWARE_CLASSES. It now checks that DebugToolbarMiddleware occurs in
one of the settings.

Updated installation documentation to reflect new requirements.

The bundled example project was updated to current Django and Debug
Toolbar configuration recommendations.

Fixes django-commons#838
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