amitu/importd — pull request #39 by if1live (2014-08-05 13:01:52+00:00)
Title: Support Django Debug Toolbar 1.2.1

Current master branch doesn't support django debug toolbar 1.2.1. so, I modify source..

## Modify debug toolbar setting

In current master branch, 'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel' is exist.
debug toolbar 1.2.1 doesn't support it.
https://github.com/django-debug-toolbar/django-debug-toolbar/tree/1.2.1/debug_toolbar/panels

I copy and paste panel list from djdt document.
http://django-debug-toolbar.readthedocs.org/en/1.2/configuration.html#debug-toolbar-panels

And remove some unused setting.
INTERCEPT_REDIRECTS is not in 1.2.1.
In your code, SHOW_TOOLBAR_CALLBACK is always true. so I use djdt default value.

## Customizable INTERNAL_IPS

In current master branch, INTERNAL_IPS is hard coded.
https://github.com/amitu/importd/blob/master/importd/__init__.py#L292
I'm using virtual machine, I want to add extra IP in INTERNAL_IPS.

## Wrap urlpatterns

With django debug toolbar 1.2.1, d.urlpatterns is broken.
All url patterns disappeared after djdt url pattern is added.

I think cause is this djdt code.
https://github.com/django-debug-toolbar/django-debug-toolbar/blob/1.2.1/debug_toolbar/settings.py#L205-L208

after this code, D.urlpatterns is broken. I think that importing module is conflict.
(I'm not python hacker, I don't know python import system. Just I guess.)

I wrap urlpatterns as function.
https://github.com/if1live/importd/commit/5aa28fe5bd1748513299636d49f6fddd97c05c82

anyway, It works.

## Sample

I write sample code. importd + django debug toolbar 1.2.1
https://github.com/if1live/importd-boilerplate/
Try it.