Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F80962254
serializers.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
Tue, Sep 3, 12:01
Size
3 KB
Mime Type
text/x-python
Expires
Thu, Sep 5, 12:01 (2 d)
Engine
blob
Format
Raw Data
Handle
20488466
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
serializers.py
View Options
from
rest_framework
import
serializers
from
dj_rql.drf.serializers
import
RQLMixin
# from .models import Journal, Institution, OrganizationCondition, JournalCondition, ConditionSet, Term
from
.models
import
*
class
JournalSerializer
(
RQLMixin
,
serializers
.
ModelSerializer
):
class
Meta
:
model
=
Journal
fields
=
'__all__'
depth
=
4
class
InstitSerializer
(
RQLMixin
,
serializers
.
ModelSerializer
):
class
Meta
:
model
=
Institution
fields
=
'__all__'
depth
=
4
class
TermSerializer
(
RQLMixin
,
serializers
.
ModelSerializer
):
class
Meta
:
model
=
Term
fields
=
'__all__'
depth
=
4
class
ConditionSetSerializer
(
RQLMixin
,
serializers
.
ModelSerializer
):
term
=
TermSerializer
(
many
=
True
,
read_only
=
True
)
class
Meta
:
model
=
ConditionSet
# pre filter for rql
# fields = ['id','condition_type','term','journal','organization']
# add for informations purpose
fields
=
'__all__'
depth
=
4
class
TermSerializer
(
RQLMixin
,
serializers
.
ModelSerializer
):
class
Meta
:
model
=
Term
fields
=
'__all__'
depth
=
2
class
CountrySerializer
(
RQLMixin
,
serializers
.
ModelSerializer
):
class
Meta
:
model
=
Country
fields
=
'__all__'
depth
=
4
class
CitySerializer
(
RQLMixin
,
serializers
.
ModelSerializer
):
class
Meta
:
model
=
City
fields
=
'__all__'
depth
=
4
class
LanguageSerializer
(
RQLMixin
,
serializers
.
ModelSerializer
):
class
Meta
:
model
=
Language
fields
=
'__all__'
depth
=
4
class
IssnSerializer
(
RQLMixin
,
serializers
.
ModelSerializer
):
class
Meta
:
model
=
Issn
fields
=
'__all__'
depth
=
4
class
OaSerializer
(
RQLMixin
,
serializers
.
ModelSerializer
):
class
Meta
:
model
=
Oa
fields
=
'__all__'
depth
=
4
class
PublisherSerializer
(
RQLMixin
,
serializers
.
ModelSerializer
):
class
Meta
:
model
=
Publisher
fields
=
'__all__'
depth
=
4
class
VersionSerializer
(
RQLMixin
,
serializers
.
ModelSerializer
):
class
Meta
:
model
=
Version
fields
=
'__all__'
depth
=
4
class
LicenceSerializer
(
RQLMixin
,
serializers
.
ModelSerializer
):
class
Meta
:
model
=
Licence
fields
=
'__all__'
depth
=
4
class
Cost_factor_typeSerializer
(
RQLMixin
,
serializers
.
ModelSerializer
):
class
Meta
:
model
=
Cost_factor_type
fields
=
'__all__'
depth
=
4
class
Cost_factorSerializer
(
RQLMixin
,
serializers
.
ModelSerializer
):
class
Meta
:
model
=
Cost_factor
fields
=
'__all__'
depth
=
4
class
ConditionTypeSerializer
(
RQLMixin
,
serializers
.
ModelSerializer
):
class
Meta
:
model
=
ConditionType
fields
=
'__all__'
depth
=
4
class
OrganizationConditionSerializer
(
RQLMixin
,
serializers
.
ModelSerializer
):
class
Meta
:
model
=
OrganizationCondition
fields
=
'__all__'
depth
=
4
class
JournalConditionSerializer
(
RQLMixin
,
serializers
.
ModelSerializer
):
class
Meta
:
model
=
JournalCondition
fields
=
'__all__'
depth
=
4
Event Timeline
Log In to Comment