Skip to content

Instantly share code, notes, and snippets.

View psych0panda's full-sized avatar
🐼
sudo dd if=/dev/zero of=/dev/null

i.piatigorets psych0panda

🐼
sudo dd if=/dev/zero of=/dev/null
View GitHub Profile
@psych0panda
psych0panda / README.md
Created February 8, 2022 00:18 — forked from D2theR/README.md
Auto-generates Serializers & ModelViewSets in a Django API using just models

Why?

I got sick of writing the same Serializer & ModelViewSet classes over and over so I found and wrote some code to do it for me, and somehow it works! Please note that there are a lot of caveats to running an API like this and while this may work, I know there's A LOT of room for improvement, feel free to fork and help!

USAGE

Import the router module to your main sites urls.py file as the injection point like so... Make sure to remove any other imports from other viewsets that you don't need that may conflict!