I do agree that you Sammy could try changing the mysite/mysite/setting.py

  INSTALLED_APPS=[
        'polls.apps.PollsConfig',
         """"
           The rest of the code
          """
       ]

And I too was wondering if he placed 'polls/' as his URL in
mysite/polls/urls.py that cause the error. (IF that is the case)
But in my opinion, for future development purposes and good practice to
know which django app you are at while browsing at webpage.
Remain the mysite/mysite/urls.py as it is. The code should be:

from django.contrib import admin
from django.urls import include, path

urlpatterns = [
path('polls/', include('polls.urls')),
path('admin/', admin.site.urls),
]

and instead change the mysite/polls/urls.py The code should be:

from django.urls import path
from . import views

urlpatterns = [
path('', views.IndexView.as_view(), name='index'),
]

Please do correct me if I am wrong. Hope it helps.

Regards,
Kai Wey

On Thu, Aug 1, 2019 at 6:17 PM Franck Tchouanga <ftchoua...@gmail.com>
wrote:

> I wanted to precise at the level of the syntax from what I wrote above
>
>  Urlpatterns = [
>
>       Path(' ',include('polls.URLs')),
>       Path('admin/', admin.site.urls),
>    ]
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/a79f2408-a229-4048-a859-bda8e0675e9e%40googlegroups.com
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPcVkji72KQ7Cqq89xKJKnghQWDKsJ12Sc4SUH4qpSQtUiJVrQ%40mail.gmail.com.

Reply via email to