【发布时间】:2021-10-02 15:02:46
【问题描述】:
我需要像/catalog/catalog_slug/tag_slug1/tag_slug2/tag_slug3这样的网址
re_path(r'^catalog/(?P<catalog_slug>\w+)/(?P<tag_slugs>(?:\w+/)+)', ...)
我阅读了如何做多个 tag_slugs,但是当我将它与另一个模型(目录) This stackoverflow answer[] 的单个 slug 混合时,我得到了:
TypeError: get() got multiple values for argument 'catalog_slug'
我的看法
class CategorySeoTagsView(APIView):
def get(self, catalog_slug, tag_slugs):
pass
【问题讨论】:
-
@thebjorn,同样的错误
-
@thebjorn 我更新了回溯。我没有更多信息,只是我需要 /catalog/somecatalogslug/tagslug1/tagslug2/tagslug3/ 之类的东西来按标签过滤