Django错误-不存在匹配的查询
我最终将项目发布到生产级别,突然之间,我遇到了一些在开发阶段从未解决的问题。 当用户发布一些操作时,有时会出现以下错误。 Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response response = callback(request, *callback_args, **callback_kwargs) File "home/ubuntu/server/opineer/comments/views.py", line 103, in comment_expand comment = Comment.objects.get(pk=comment_id) File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", line 131, in get return self.get_query_set().get(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 366, in get % self.model._meta.object_name) DoesNotExist: Comment matching query does not …