我有两个型号,Company和Product,Product有一个到Company的ForeignKey company = models.ForeignKeycompany, pk=product_pk) raise Http404并且我有以下错误:
The QuerySet value for an exact lookup must be limit
我正在尝试使用slug访问一个页面,但是我一直得到这个错误The QuerySet value for an exact lookup must be limited to one result using,我认为这是一个filter或get错误,但我不知道错误是从哪里来的。views.tutorial_topic_category, name='tutorial-topic-category'),
path("<slug>
我是django的新手,我遇到了一个我无法理解的错误。我有3个模型,即客户,服务和使用。我想获取客户使用的服务。我通过查询模型(特别是使用filter方法)通过uses模型来实现这一点。然而,我得到了以下错误 ValueError at /employee/view_customer/精确查找的QuerySet值必须使用切片限