jazzband/django-hosts

Can I insert django-debug-toolbar urls to every urls.py ?

jeyraof opened this issue · 3 comments

In hosts.py:

host_patterns = patterns(
    '',
    host(r'admin', 'server.admin_urls', name='admin'),
    host(r'', 'main.urls', name='main'),
    host(r'app1', 'app_one.urls', name='app1'),
    host(r'app2', 'app_two.urls', name='app2'),
)

And now, I'm using debug_toolbar on every app like:

app_one/urls.py:

urlpatterns = [blahblah~]

if settings.DEBUG:
    import debug_toolbar
    urlpatterns += [
        path('__debug__/', include(debug_toolbar.urls))
    ]

app_two/urls.py:

urlpatterns = [blahblah~]

if settings.DEBUG:
    import debug_toolbar
    urlpatterns += [
        path('__debug__/', include(debug_toolbar.urls))
    ]

So, how to insert debug_toolbar urls to every urls mentioned by hosts.py ?

Can I get some insight to resolve it, @jezdez ?

Usage questions aren't answered on the issue tracker.