try to open http://127.0.0.1:8000/hello
2012/3/25 Sithembewena Lloyd Dube <[email protected]>: > Hi Mika, > > Welcome to Django. > > I think the issue is that the URL 'http://127.0.0.1:8000/' merely points to > your local machine's port (8000), whereas you want to browse to > 'http://127.0.0.1:8000/hello/' - which is the URL defined in your urls.py > file which maps to your "homepage" view (hello). > > > On Sat, Mar 24, 2012 at 11:40 PM, Mika <[email protected]> wrote: >> >> I'm a total newbie to django and just started the book. I created a >> project and I'm now trying to create my first page, but I keep getting >> an error page that says: >> >> Page not found (404) >> Request Method: GET >> Request URL: http://127.0.0.1:8000/ >> Using the URLconf defined in redlab.urls, Django tried these URL >> patterns, in this order: >> ^hello/$ >> The current URL, , didn't match any of these. >> >> >> Here's what's in my urls.py file: >> >> from django.conf.urls.defaults import* >> from redlab.views import hello >> >> urlpatterns = patterns('', ('^hello/$', hello),) >> >> # Uncomment the next two lines to enable the admin: >> # from django.contrib import admin >> # admin.autodiscover() >> # Examples: >> # url(r'^$', 'redlab.views.home', name='home'), >> # url(r'^redlab/', include('redlab.foo.urls')), >> >> # Uncomment the admin/doc line below to enable admin >> documentation: >> # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), >> >> # Uncomment the next line to enable the admin: >> # url(r'^admin/', include(admin.site.urls)), >> >> >> please advise. thnx. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > > > > -- > Regards, > Sithembewena Lloyd Dube > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

