Navigation | Overlay |
---|---|
t Navigate files | h Toggle hits |
y Change url to tip of branch | m Toggle misses |
b / v Jump to prev/next hit line | p Toggle partial |
z / x Jump to prev/next missed or partial line | 1..9 Toggle flags |
shift + o Open current page in GitHub | a Toggle all on |
/ or ? Show keyboard shortcuts dialog | c Toggle context lines or commits |
1 |
"""cyborgbackup URL Configuration
|
|
2 |
|
|
3 |
The `urlpatterns` list routes URLs to views. For more information please see:
|
|
4 |
https://docs.djangoproject.com/en/1.11/topics/http/urls/
|
|
5 |
Examples:
|
|
6 |
Function views
|
|
7 |
1. Add an import: from my_app import views
|
|
8 |
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
|
|
9 |
Class-based views
|
|
10 |
1. Add an import: from other_app.views import Home
|
|
11 |
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
|
|
12 |
Including another URLconf
|
|
13 |
1. Import the include() function: from django.conf.urls import url, include
|
|
14 |
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
|
|
15 |
"""
|
|
16 | 3 |
from django.conf.urls import url |
17 | 3 |
from django.contrib import admin |
18 | 3 |
from django.conf import settings |
19 | 3 |
from django.urls import include, path |
20 |
|
|
21 | 3 |
app_name = 'cyborgbackup' |
22 | 3 |
urlpatterns = [ |
23 |
url(r'^admin/', admin.site.urls), |
|
24 |
url(r'^api/', include(( |
|
25 |
'cyborgbackup.api.urls', |
|
26 |
'cyborgbackup'
|
|
27 |
), namespace='api')), |
|
28 |
url(r'', include('cyborgbackup.ui.urls', namespace='ui')), |
|
29 |
]
|
|
30 |
|
|
31 | 3 |
if settings.DEBUG: |
32 |
import debug_toolbar |
|
33 |
urlpatterns = [ |
|
34 |
path('__debug__/', include(debug_toolbar.urls)), |
|
35 |
|
|
36 |
# For django versions before 2.0:
|
|
37 |
# url(r'^__debug__/', include(debug_toolbar.urls)),
|
|
38 |
|
|
39 |
] + urlpatterns |
Read our documentation on viewing source code .