The current URL, app/, didn't match any of these

前端 未结 8 656
無奈伤痛
無奈伤痛 2020-12-17 17:58

I\'m a newbie in Django and just started looking at it before a day by installing Django 1.10 on my local.

I\'ve followed all the instructions of this link https://d

相关标签:
8条回答
  • 2020-12-17 18:57

    checklist:

    1. make sure to run the server
    >>python manage.py runserver
    

    Watching for file changes with StatReloader
    Performing system checks...
    System check identified no issues (0 silenced).
    February 01, 2020 - 15:04:46
    Django version 3.0.2, using settings 'corona.settings'
    Starting development server at http://127.0.0.1:8000/
    Quit the server with CTRL-BREAK.

    2.open the browser with cmd running, http://127.0.0.1:8000/polls should be added to the url.

    0 讨论(0)
  • 2020-12-17 18:59

    I had the same problem as described. Running a Windows machine.

    It turned out, that the virtual environment I was using had not been configured properly (or maybe I had forgot to activate it before installing Django) and the interpreter and django-admin were fetched from the wrong path by CMD.EXE.

    If it appears as if Django is "ignoring" your urls.py - try deleting everything, re-creating the virtual environment, activating it and re-installing Django afterwards.

    Hope this helps.

    0 讨论(0)
提交回复
热议问题