Skip to content

Instantly share code, notes, and snippets.

View piglei's full-sized avatar

piglei piglei

View GitHub Profile
@piglei
piglei / slz_table_doc.py
Last active June 9, 2022 09:27
A Django command prints DRF serializer's schema in Markdown table format.
"""
A Django command prints DRF serializer's schema in Markdown table format.
## Tutorial
Make sure "drf_yasg" package is installed, place this file into your Django app's
`/management/commands` directory, run bellow command to print documentation for Serializer:
python manage.py slz_table_doc --name ModuleSLZ