2👍
Your problem is that you are including your homepage urls twice. Remove the second entry
url(r'^welcome/', include('homepage.urls')),
This is explained in the docs on including other url confs
Whenever Django encounters include() (django.conf.urls.include()), it chops off whatever part of the URL matched up to that point and sends the remaining string to the included URLconf for further processing.
In your case, the 'welcome/'
is removed from the url, which leaves ''
, which is matched by the url pattern for the homepage.
0👍
That’s because it never enters the second condition for the app, it verifies the condition at the url root conf, welcome/
, and after that goes directly to ^$
in the app. A solution would be remove the welcome/
from the url root
.
The first welcome definition is redundant and is causing the “bug”.
- [Answered ]-Django, not able to load template through TEMPLATE_DIRS
- [Answered ]-Add users to groups in Django