Serializers¶
S3ConfigSerializer
¶
Bases: Serializer
Serializer to represent s3 config.
Source code in saritasa_s3_tools/django/serializers.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
S3FieldsConfigMixin
¶
Extend serializer_field_mapping with s3 fields.
Deprecate it once encode/django-rest-framework#9507 is accepted.
Source code in saritasa_s3_tools/django/serializers.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | |
serializer_field_mapping
property
¶
Extend serializer mapping with s3 fields.
S3ParamsSerializer
¶
Bases: Serializer
Serializer for showing params for s3 upload.
Source code in saritasa_s3_tools/django/serializers.py
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | |
S3RequestParamsSerializer
¶
Bases: Serializer
Serializer for validation s3 uploading fields.
Source code in saritasa_s3_tools/django/serializers.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | |
__init__(context_request=None, *args, **kwargs)
¶
Set current user.
Source code in saritasa_s3_tools/django/serializers.py
42 43 44 45 46 47 48 49 50 51 | |
validate(attrs)
¶
Perform validations.
Check what input data is valid for specified configuration.
Source code in saritasa_s3_tools/django/serializers.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | |
validate_config(config)
¶
Check that user can use dest.
Source code in saritasa_s3_tools/django/serializers.py
53 54 55 56 57 58 59 60 61 62 | |
S3UploadSerializer
¶
Bases: Serializer
Serializer auto swagger documentation.
This serializer used just for packages that capable to generate openapi/swagger specs, so that front-end team could see specs for response for view.
Source code in saritasa_s3_tools/django/serializers.py
122 123 124 125 126 127 128 129 130 131 132 | |