1st error in http://127.0.0.1:8000/ i dont know why I don't see any error--Page not found (404)
Request Method: GET Request URL: http://127.0.0.1:8000/ Using the URLconf defined in
wisdompets.urls
, Django tried these URL patterns, in this order:
- admin/
- ^$ [name='home']
- ^adoptions/(\d+)/ [name='pet_detail']
The empty path didn't match any of these.
You're seeing this error because you have
DEBUG = True
in your Django settings file. Change that toFalse
, and Django will display a standard 404 page.
2nd Error filename views.py
from django.contrib import adminfrom django.urls import pathfrom adoptions import viewsurlpatterns = [path('admin/', admin.site.urls),path(r'^$', views.home, name='home'),path(r'^adoptions/(\d+)/', views.pet_detail, name='pet_detail'),]
3rd error filename
from django.contrib import adminfrom django.urls import pathfrom adoptions import viewsurlpatterns = [path('admin/', admin.site.urls),path(r'^$', views.home, name='home'),path(r'^adoptions/(\d+)/', views.pet_detail, name='pet_detail'),]
4th error in terminal
WARNINGS:
?: (2_0.W001) Your URL pattern '^$' [name='home'] has a route that contains '(?P<', begins with a '^', or ends with a '$'. This was likely an oversight when migrating to django.urls.path().
?: (2_0.W001) Your URL pattern '^adoptions/(\d+)/' [name='pet_detail'] has a route that contains '(?P<', begins with a '^', or ends with a '$'. This was likely an oversight when migrating to django.urls.path().
System check identified 2 issues (0 silenced).
April 30, 2020 - 09:22:25
Django version 3.0.5, using settings 'wisdompets.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Not Found: /
[30/Apr/2020 09:22:29] "GET / HTTP/1.1" 404 2176
Not Found: /
[30/Apr/2020 09:22:53] "GET / HTTP/1.1" 404 2176
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b28044c2-c7f6-4cd8-a5e1-a20d9d8abfd1%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CANfN%3DK9akoVc8Avh-vLr5gcGrViVZyOO8uTmcXLWOH3MhDVtnA%40mail.gmail.com.
No comments:
Post a Comment