【问题标题】:Python web app running on django with cPanel showing error: page not found在 django 上运行的 Python Web 应用程序,cPanel 显示错误:找不到页面
【发布时间】:2020-11-01 10:55:31
【问题描述】:

1 个月前我还没有遇到这个问题,突然间,当我转到特定页面时,我的网络应用程序显示此错误。

找不到页面 (404) 请求方法:POST 请求网址:https://database.opticscouting.com/admin/users/player/1/change/ 提出者:django.contrib.admin.options.change_view 使用 opticdb.urls 中定义的 URLconf,Django 按以下顺序尝试了这些 URL 模式:

admin/
[name='login']
logout/ [name='logout']
password-change/ [name='password_change']
dashboard/ [name='dashboard']
player/<int:pk>/ [name='player']
favorites/ [name='favorites']
favorite/<int:pk>/ [name='favorite']
The current path, player/1/change/, didn't match any of these.

本站运行的python版本为3.3.7。

错误日志如下所示:

App 633453 output: /opt/passenger-5.3.7-4.el6.cloudlinux/src/helper-scripts/wsgi-loader.py:26: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
App 633453 output: import sys, os, re, imp, threading, signal, traceback, socket, select, struct, logging, errno
App 633453 output: [ pid=633453, time=2020-06-27 15:18:00,715 ]: Not Found: /admin/users/player/1/change/

【问题讨论】:

    标签: python django cpanel


    【解决方案1】:

    player/1/change/ 路径实际上与您的任何网址都不匹配。您收到的日志中的错误只是警告您 imp 模块已弃用。

    【讨论】:

      猜你喜欢
      • 2022-01-03
      • 2022-06-18
      • 1970-01-01
      • 2018-09-12
      • 2017-10-09
      • 1970-01-01
      • 2017-01-04
      • 1970-01-01
      • 2010-12-24
      相关资源
      最近更新 更多