标签:路由 res print image def name route class rest
from booktest import views
# 1. 创建Router对象
from rest_framework.routers import SimpleRouter
router = SimpleRouter()
# 2. 注册视图集
router.register('books', views.BookInfoViewSet, base_name='books')
# 3. 打印生成的url配置项
for url in router.urls:
print(url)
标签:路由 res print image def name route class rest
原文地址:https://www.cnblogs.com/oklizz/p/11290618.html