Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F65463760
urls.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Jun 3, 23:51
Size
1005 B
Mime Type
text/x-python
Expires
Wed, Jun 5, 23:51 (2 d)
Engine
blob
Format
Raw Data
Handle
18076088
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
urls.py
View Options
"""django_api URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from
django.contrib
import
admin
from
django.urls
import
path
,
include
from
django.views.generic
import
TemplateView
urlpatterns
=
[
path
(
''
,
TemplateView
.
as_view
(
template_name
=
'react.html'
)),
path
(
'admin/'
,
admin
.
site
.
urls
),
path
(
'api/'
,
include
(
'django_api.urls'
)),
path
(
'hello-webpack/'
,
TemplateView
.
as_view
(
template_name
=
'hello_webpack.html'
)),
]
Event Timeline
Log In to Comment