5.3.通过drf的apiview实现api
drf的优势
The Web browsable API is a huge usability win for your developers.
Authentication policies including packages for OAuth1a and OAuth2.
Serialization that supports both ORM and non-ORM data sources.
Customizable all the way down - just use regular function-based views if you don't need the more powerful features.
Extensive documentation, and great community support.
Used and trusted by internationally recognised companies including Mozilla, Red Hat, Heroku, and Eventbrite.
goods/serializer.py
goods/views.py
goods/urls.py
mo_shop/urls.py
Last updated
Was this helpful?