# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= python-drf-yasg VERSION= 1.21.8 KEYWORDS= python VARIANTS= v12 v13 SDESC[v12]= Django Swagger/OpenAPI spec generator (3.12) SDESC[v13]= Django Swagger/OpenAPI spec generator (3.13) HOMEPAGE= https://github.com/axnsan12/drf-yasg CONTACT= Python_Automaton[python@ironwolf.systems] DOWNLOAD_GROUPS= main SITES[main]= PYPIWHL/8e/45/141c52a3213329d9f68cadc7daf4dc03e259f2301c87c421a68af174d7a4 DISTFILE[1]= drf_yasg-1.21.8-py3-none-any.whl:main DIST_SUBDIR= python-src DF_INDEX= 1 SPKGS[v12]= single SPKGS[v13]= single OPTIONS_AVAILABLE= PY312 PY313 OPTIONS_STANDARD= none VOPTS[v12]= PY312=ON PY313=OFF VOPTS[v13]= PY312=OFF PY313=ON DISTNAME= drf_yasg-1.21.8.dist-info GENERATED= yes [PY312].RUN_DEPENDS_ON= python-djangorestframework:single:v12 python-Django:single:v12 python-PyYAML:single:v12 python-inflection:single:v12 python-packaging:single:v12 python-pytz:single:v12 python-uritemplate:single:v12 [PY312].USES_ON= python:v12,wheel [PY313].RUN_DEPENDS_ON= python-djangorestframework:single:v13 python-Django:single:v13 python-PyYAML:single:v13 python-inflection:single:v13 python-packaging:single:v13 python-pytz:single:v13 python-uritemplate:single:v13 [PY313].USES_ON= python:v13,wheel [FILE:1079:descriptions/desc.single] :alt: GitHub Workflow Status :alt: Codecov :alt: PyPI :alt: Gitter :alt: ReadTheDocs :alt: Heroku deploy button .. |nbsp| unicode:: 0xA0 :trim: drf-extra-fields ================= Integration with `drf-extra-fields `_ has a problem with Base64 fields. The drf-yasg will generate Base64 file or image fields as Readonly and not required. Here is a workaround code for display the Base64 fields correctly. .. code:: python class PDFBase64FileField(Base64FileField): ALLOWED_TYPES = ['pdf'] class Meta: swagger_schema_fields = { 'type': 'string', 'title': 'File Content', 'description': 'Content of the file base64 encoded', 'read_only': False # <-- FIX } def get_file_extension(self, filename, decoded_file): try: PyPDF2.PdfFileReader(io.BytesIO(decoded_file)) except PyPDF2.utils.PdfReadError as e: logger.warning(e) else: return 'pdf' [FILE:122:distinfo] a410b235e7cc2c0f6b9d4f671e8efe6f2d27cba398fbd16064e16ef814998444 4289546 python-src/drf_yasg-1.21.8-py3-none-any.whl