Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F78621508
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
Thu, Aug 22, 00:56
Size
1 KB
Mime Type
text/x-python
Expires
Sat, Aug 24, 00:56 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
20077121
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
urls.py
View Options
from
django.urls
import
path
,
re_path
,
include
from
django.conf.urls.static
import
static
from
django.conf
import
settings
# from .views import JournalViewSet, InstitViewSet, FunderViewSet, ConditionSetViewSet, TermViewSet
from
.views
import
*
from
rest_framework
import
routers
from
rest_framework.schemas
import
get_schema_view
router
=
routers
.
DefaultRouter
()
router
.
register
(
r'journal'
,
JournalViewSet
)
router
.
register
(
r'organization'
,
OrgaViewSet
)
router
.
register
(
r'funder'
,
FunderViewSet
)
router
.
register
(
r'conditionset'
,
ConditionSetViewSet
)
router
.
register
(
r'term'
,
TermViewSet
)
#show table details in the API
router
.
register
(
r'country'
,
CountryViewSet
)
router
.
register
(
r'city'
,
CityViewSet
)
router
.
register
(
r'language'
,
LanguageViewSet
)
router
.
register
(
r'issn'
,
IssnViewSet
)
router
.
register
(
r'oa'
,
OaViewSet
)
router
.
register
(
r'publisher'
,
PublisherViewSet
)
router
.
register
(
r'version'
,
VersionViewSet
)
router
.
register
(
r'licence'
,
LicenceViewSet
)
router
.
register
(
r'cost_factor_type'
,
Cost_factor_typeViewSet
)
router
.
register
(
r'cost_factor'
,
Cost_factorViewSet
)
router
.
register
(
r'conditiontype'
,
ConditionTypeViewSet
)
router
.
register
(
r'JournalCondition'
,
JournalConditionViewSet
)
router
.
register
(
r'organizationCondition'
,
OrganizationConditionViewSet
)
urlpatterns
=
[
path
(
''
,
include
(
router
.
urls
)),
path
(
'openapi'
,
get_schema_view
(
title
=
"OACCT API"
,
description
=
"API of the Open Access Compliance Check Tool (OACCT)"
,
version
=
"0.0.1"
),
name
=
'openapi-schema'
),
]
Event Timeline
Log In to Comment