我通过cmd为Django.However设置了网页,在访问127.0.0.1:8001的索引页面时遇到了问题。我尝试更新urls.py,但仍然有问题。
浏览器页面错误:找不到页面(404)请求方法:获取请求URL:使用barry.urls中定义的URLconf,Django按以下顺序尝试了这些URL模式:
admin/当前路径index与这些都不匹配。
urls.py file:
"""{{ project_name }} URL Configuration
The `urlpatterns` list routes URLs to views. For more
我看了我的文件超过50次,我感到很沮丧。这是我得到的错误:
Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/
Using the URLconf defined in project1.urls, Django tried these URL patterns, in this order:
^admin/
^music/
The current URL, , didn't match any of these.
You're seeing this error bec
我正在与django合作,我正在尝试获得一个简单的应用程序功能。
该应用程序本应提供一个简单的“Hello”视图,但my_app/urls.py无法从my_app/views.py导入方法。
我的应用程序名为SocialUrl
这是my-project/urls.py。
from django.conf.urls import patterns, include, url
# from SocialUrl.views import test
from django.contrib import admin
admin.autodiscover()
urlpatterns = pat
我做了这么多研究,我肯定是漏掉了什么,肯定是做错了什么。我正在运行的服务器是localhost:8000,它实际上发生在所有三个.html文件上。我已经添加了主页,一切正常,直到我尝试点击另一个html file并收到。Screenshot of the error message here Page not found (404) Request Method: GET trying to Using the URLconf defined in user.urls, Django按以下顺序尝试了这些网址模式: admin/
secret/
home/ [name='home
我正在尝试使用重定向快捷方式发出重定向,但收到以下错误
raise ImproperlyConfigured("The included urlconf %s doesn't have any patterns in it" % self.urlconf_name)
ImproperlyConfigured: The included urlconf webtools.urls doesn't have any patterns in it
我的urls.py文件如下所示:
from django.conf.urls.defaults import patter
我的一些django urls将不起作用。我可以访问我的索引页面和django管理页面。我可以登录并创建对象,没有问题。例如,我可以创建一个站点,如下所示,但当我尝试访问站点集合时,我得到了404 (即使在创建了一个站点之后)。我也在使用Django allauth,这些页面在我的urlconf上也有问题。有人能发现这个错误吗?
例如,以下url:
Page not found (404)
Request Method: GET
Request URL: http://myapp.com/admin/sites/site/
No reward found matching th
我在这里介绍Django教程:
我完全按照指示去做。但是当我尝试访问时,我看不到消息“Hello,world。你是在民调指数上。“不出所料。相反,我得到以下错误:
使用mysite.urls中定义的URLconf,Django按如下顺序尝试了这些URL模式:^admin/当前的URL polls/不与这些模式中的任何一个匹配。
这是我的mysite/urls.py文件。我不确定为什么urlpattern中的第一个regex模式无法识别。
from django.conf.urls import include, url
from django.contrib import admin
ur
我正在学习Python速成课程的第18章18.4.2,当我打开时,我正在使用Django 3.0和python 3.8显示
Page not found (404)
Request Method: GET
Request URL: http://localhost:8000/topics
Using the URLconf defined in learning_log.urls, Django tried these URL patterns, in this order:
admin/
[name='index']
The current path, topics,
这是我在WebFetcher中的url.py from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('', include('Fetcher.urls')),
path('admin/', admin.site.urls),
]
if setting
我正在做教程“电影租赁”,我得到了错误。使用vidly.urls中定义的URLconf,Django按以下顺序尝试了这些URL模式:
Using the URLconf defined , Django tried these URL patterns, in this order:
1.admin/
2.movies/ [name='movie_index']
3.movies/ <int:movie_id [name='movie_detail']
The current path, movies/1, didn't match any of
我正在尝试在password_reset中实现django.contrib.auth.views,如所示所示
但我在这方面绝对没有运气,因为我一直有以下例外:
Exception Type: ImproperlyConfigured
Exception Value: The included urlconf tutorial.urls doesn't have any patterns in it
我的项目urls.py (教程):
urlpatterns = patterns('',
url(r'^adminp/', include('
我再次陷入困境,希望这次我也能得到有用的帮助。我试图运行这个应用程序,但它给了我URL配置错误,如下所示:
使用在pyshop.urls中定义的URLconf,Django按以下顺序尝试了这些URL模式: admin/ products/空路径与其中任何一个都不匹配。看到这个错误是因为Django设置文件中有DEBUG = True。将其更改为False,Django将显示一个标准的404页。
我在这个平台上看到了类似的查询,但是我无法使用Django版本2.1找到我的答案
我在pyshop.urls中的代码是:
from django.contrib import admin
from dj