Home  >  Q&A  >  body text

python - django的代码,昨晚上还好好的,今天早上进不去管理界面了,怎么回事?谢谢。

主url

就是连登陆界面都没有了,http://127.0.0.1:8001/admin/显示的是主页,也就是空的那个url指向的html页面。

阿神阿神2741 days ago525

reply all(2)I'll reply

  • 黄舟

    黄舟2017-04-18 10:35:17

    When Django matches URLs, it matches them from top to bottom in the URL list
    '' can match anything''能匹配任何东西
    所以admin就无法访问了
    在使用''So the admin cannot access

    When using '' When matching a wide range of URL regular expressions, it is recommended to put it at the end of the URL list🎜

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-18 10:35:17

    In addition to the matching problem mentioned above
    There is also a misunderstanding in the way you write the URL
    Like your matchingindex的时候最好使用r'^$'
    Generally, the more complex the URL, the higher it is placed

    reply
    0
  • Cancelreply