Wednesday, March 25, 2020

Re: Error running Django tutorial

Kyle D,

This is why I stay in this thread. Thanks for the heads up. I remember being so lost when I tried to start teaching myself Django. What's the class for?

Regards


On Tue, Mar 24, 2020 at 10:46 PM kyle D <krdewitt22@gmail.com> wrote:
I'm using Django for a class, and came across this thread and thought I'd post what fixed it for me in case someone else has the same issue I did.

Makes sure your mysite/urls.py is the one that has the urlpatterns[] with the path to your polls and not the mysite/polls/urls.py.

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

 
Not this one:
app_name = 'polls'
urlpatterns = [
    # ex: /polls/
    path('', views.index, name='index'),

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/aZQoPBeHDPs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/61ca2cd8-70cb-4a5b-8ae7-5657ef413209%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CANQVT%2BY-WhoRQyM7hD9d1WK-XjC12SQMuD2RajeWHWZWqBof2g%40mail.gmail.com.

No comments:

Post a Comment