Forums

Only "It worked!" page displaying but no admin page.

Hi, I am newbie to the process of hosting a web app. I am using django. I created an web app as per the tutorial provided. The url is as below: http://tutorial.pythonanywhere.com/django#tutorial-setting-up-a-new-django-app-on-pythonanywhere

whenever I tried to open http://mygreymatter.pythonanywhere.com , I got only "It worked!" page even after configuring admin page. What can be the problem? Are there any free web hosting for djanog with not much headaches available, at least to test my app?

cheers MAYO.

Did you hit "Reload Web App" after you made your changes?

@Harry Thanks a lot. http://mygreymatter.pythonanywhere.com/admin/ works as it should. But http://mygreymatter.pythonanywhere.com says


Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order: ^/$ ^admin/ The current URL, , didn't match any of these.


My url pattern contains

from myapp.views import home url(r'^/$', home), url(r'^admin/', include(admin.site.urls)),

where as myapp is an application

Not even displaying "It worked!" page as previously

In your urls.py, you have:

url(r"^/$", home)

Django strips leading /s from the url before comparing it to the entries in urls.py. You need

url(r"^$", home)

Thanks Glenn. It solved.