Melissa Stewart
Melissa Stewart

Reputation: 3605

Can't see the django home page

I'm new to django, thus the question. I've a django project set up with two apps both of which seem to work fine. Just that I can't reach the homepage - which should be the default django page. I get the following error,

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

admin/
^aggregator/
^bouncer/
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 to False, and Django will display a standard 404 page.

This is my urls.py

urlpatterns = [
        path('admin/', admin.site.urls),
        url(r'^aggregator/', include('aggregator.urls')),
        url(r'^bouncer/', include('bouncer.urls')),

    ]

What am I missing here?

Upvotes: 0

Views: 694

Answers (1)

John Joseph Fernandes
John Joseph Fernandes

Reputation: 369

you are missing the path to your home directory in the urlpatterns

urlpatterns = [
    path('admin/', admin.site.urls),
    url(r'^aggregator/', include('aggregator.urls')),
    url(r'^bouncer/', include('bouncer.urls')),
   url(r'^$', views.yourhomeview),

]

Upvotes: 1

Related Questions