django documentation tutorial 3 questions. home page missing.

21 views
Skip to first unread message

cheesiong lim

unread,
May 8, 2014, 11:46:05 PM5/8/14
to django...@googlegroups.com
hi all,
 i am learning django by using django 1.6 documents tutorial 1 - 6.
 this round is my 4th try and, previous 3 try was successful and i understand more on every try.

 i am in tutorial 3 now, to create views.

 according to the documents, after i created a view, i need to map it to a URL.
 so i follow the documents to add a urls.py in the polls directory.
 and then i follow the document to add include() to mysite/urls.py
 i am able to so called wired an index view into the polls view.

 now if i go back to localhost:8000, i get an error page,
 so my question is
 1) WHY?
 2) how to get back my localhost:8080 index page co-exist with  the polls index page?

thank you very much everyone for your time. i am new and sorry for so simple question.
thank you.


François Schiettecatte

unread,
May 9, 2014, 6:57:44 AM5/9/14
to django...@googlegroups.com
Presumably because there is nothing set to handle localhost:8000/ in your urlpatterns like this:

# Root view, goes to 'app.home.views.page' (r'^$', 'app.home.views.page'),


François
> --
> 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...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f3f727db-3c1f-493d-a581-f19376a9a6d8%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

signature.asc
Reply all
Reply to author
Forward
0 new messages