You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is the first model example the models.py models, or is that inside serializers.py?
In the quick start, the first section is declaring models in pure sqlalchemy. In a typical django app these would be in models.py
Do I import that model into the serializer?
See UserSerializer.Meta.model in the quick start. This serializer inherits from rest_witchcraft.serializers.ModelSerializer
Do I import rest_framework serializers or the witchcraft serializers in serializers.py?
Yes, since the models are sqlalchemy models, you need to use a serializer that knows what to do with a sqlalchemy model
Would someone mind please providing a general overview of the steps needed to use this module?
This will depend on the api that you'll build but assuming you already have the sqlalchemy models setup roughly you'll need to build the serializer, then the viewset, then a router to register your viewset and generate url patterns and then include the url patterns in your project.
Hi all,
I'm struggling to understand the workflow of the documentation.
models.py
models, or is that insideserializers.py
?serializers.py
?I am struggling to just get to a point where I can setup a simple model and reflect that in django-rest-framework in sqlalchemy format.
Would someone mind please providing a general overview of the steps needed to use this module?
Thank you for your time.
The text was updated successfully, but these errors were encountered: