Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Django Runserver
#1
Hi

I am learning django but python environment setting is complicated. Here is the error when i run server and open 127.0.0.1:8000/admin

Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/admin
Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:

1 ^admin/
2 ^webapp/
The current path, admin, didn't match any of these.

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.
Reply
#2
I think the issue is with these codes
In Website/Webapp/urls.py:
from django.conf.urls import patterns, url
from . import views

urlpatterns = [
    url(r'$', views.index, name='index'),
]
In website\website\ urls.py
from django.conf.urls import patterns, include, url
from django.contrib import admin

urlpatterns = [
    url(r'^admin/', include (admin.site.urls)),
    url(r'^webapp/', include('webapp.urls')),
]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Django: How to automatically substitute a variable in the admin page at Django 1.11? m0ntecr1st0 3 3,246 Jun-30-2019, 12:21 AM
Last Post: scidam
  Python RunServer Django script not starting udayabirdi 0 3,136 Nov-11-2018, 09:59 PM
Last Post: udayabirdi

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020