什么是。<format>参数?

2024-05-14 16:35:03 发布

您现在位置:Python中文网/ 问答频道 /正文

  • Django==1.11

  • django扩展==1.9.7

    /api/userprofiles/<pk>/   poinkbackend.apps.userprofiles.api.viewsets.UserProfileViewset  api:userprofile-detail
    /api/userprofiles/<pk>\.<format>/ poinkbackend.apps.userprofiles.api.viewsets.UserProfileViewset  api:userprofile-detail
    /a
    

医生说

show_urls - Displays the url routes that are defined in your project. Very crude at this point.

我用format关键字搜索过。但结果与我的问题无关

它代表?format=json参数吗

我曾尝试用html、xml替换json。我得到了错误的回报

参考资料:http://django-extensions.readthedocs.io/en/latest/command_extensions.html?highlight=show_urls


Tags: appsdjangoapijsonformathtmlshowurls

热门问题