A simpler way to view django projects
add include to the urls
1 file changed, +2 -2
+2-2snippets/python.json
| @@ -2,7 +2,7 @@ | ||
| 2 | 2 | "DjangoTree URLs": { |
| 3 | 3 | "prefix": "dt-urls", |
| 4 | 4 | "body": [ |
| 5 | - "from django.urls import path, re_path", | |
| 5 | + "from django.urls import path, re_path, include", | |
| 6 | 6 | "from . import views", |
| 7 | 7 | "", |
| 8 | 8 | "urlpatterns = [", |
| @@ -14,7 +14,7 @@ | ||
| 14 | 14 | "DjangoTree Websocket URLs": { |
| 15 | 15 | "prefix": "dt-ws-urls", |
| 16 | 16 | "body": [ |
| 17 | - "from django.urls import path, re_path", | |
| 17 | + "from django.urls import path, re_path, include", | |
| 18 | 18 | "from . import consumers", |
| 19 | 19 | "", |
| 20 | 20 | "websocket_urlpatterns = [", |