Django模型是否支持多个子弹?

时间:2020-05-10 21:36:50

标签: python django-3.0

第一次学习django。想要生成这样的网址-example.com/category,pk,title

目前,我只能生成此内容-example.com/pk,title

这是我的模特。py

path(
    "<str:slug0>,<int:pk>,<str:slug1>",
    ArticlePkAndSlugDetailView.as_view(),
    name="article-pk-slug-detail",
),

urls.py

    Exception Type: NoReverseMatch at /django- blog/
    Exception Value: Reverse for 'article-pk-slug-detail' with keyword arguments '{'slug0': 'offer', 'pk': 4, 'slug1': ''}' not found. 1 pattern(s) tried: ['supercar\\/(?P<slug0>[^/]+)\\,(?P<pk>[0-9]+)\\,(?P<slug1>[^/]+)$']

我得到了这个范围来学习新知识:

const result = unwantedWords.reduce((prev, current)=>prev.replace(current,''), givenString);

我尝试过哪些菜鸟菜?救救我!

0 个答案:

没有答案