On production server, when I try to edit/create an object then saving fails, returning 404. This only occurs for POST requests, GET requests (loading the page) work fine. Django is deployed via cPanel and WSGI, DEBUG is False (though it does not work even when it's set to True)
I have deployed the Django app with cpanel, running in a virtualenv. This only seems to happen for a model that uses FileField for file upload, other models can be changed/created …
我是PLSQL更高级主题的新手,所以希望有人可以帮助我.
问题: 我有一个表,其中包含管理员和用户之间发送的消息.该表有一个带有FK的message_parent到同一个表message_id字段:如果填充了该字段,则表示该消息是作为对前一个消息的回复发送的.我需要选择属于同一个对话的所有消息并显示它们.这可以通过单个查询完成,还是需要一个程序来处理这种逻辑?据我所知,它需要递归,因为我正在搜索的message_id总是在变化
示例 消息表:
|message_id|parent_id|message_content|
|----------|---------|---------------|
|101 |100 | foo |
|100 |97 | bar |
|99 |(null) | Left out |
|97 |(null) | baz |
Run Code Online (Sandbox Code Playgroud)
所以选择message_content的正确查询应该返回"baz","bar"和"foo"而不是"left out"(因为baz是原始消息).如果只有两个消息可以捆绑在一起,或者例如一个thread_id列,它会链接同一个'线程'中的所有消息,但是随着parent_id的不断变换,我很难解决它.