-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create urls module and remove import package from docs. (#1537)
* Create urls module and remove import package from docs. By creating a urls module, devs can include the urls with a string path to the urls, include('debug_toolbar.urls'). * Instantiate each panel when DebugToolbarConfig is ready. This allows the cache panel to enable the instrumentation when the app is ready. * Support previous urls installation. Update the __init__.py module to use the proper urls string path and app name. This will maintain backwards compatability with the documentations previous installation instructions. * Add test for old style, debug_toolbar.urls usage.
- Loading branch information
1 parent
ffa60c2
commit 8845345
Showing
10 changed files
with
46 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from debug_toolbar.toolbar import DebugToolbar | ||
|
||
app_name = "djdt" | ||
urlpatterns = DebugToolbar.get_urls() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
"""urls.py to test using debug_toolbar.urls in include""" | ||
from django.urls import include, path | ||
|
||
import debug_toolbar | ||
|
||
from . import views | ||
|
||
urlpatterns = [ | ||
path("cached_view/", views.cached_view), | ||
path("__debug__/", include(debug_toolbar.urls)), | ||
] |