Reputation: 181
I am new to Django and only followed one tutorial on Visual Studio which worked fine. Now I was trying to create another project on PyCharm and am facing the below problem.
the default Django template sets up fine in Pycharm and I see the default root/landing page when I run the project.
but the moment I add a url for my app in urls.py the default Django page stops working, although both the admin url and myapp urls work fine.
my Urlspatterns is provided below:
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^myapp/', include('myapp.urls', namespace='myapp')),
]
the moment I remove the line the default Django landing page starts working again. I have tried searching online but was unable to find an explanation. Posting it here because I would really like to know why this happens.
Upvotes: 3
Views: 1074
Reputation: 46
This page is intended only to show that django is working properly. As soon as you add any url it is disabled.
Upvotes: 2