Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible confusion in the docs' tutorial 1 #1509

Open
n1colassilva opened this issue Mar 27, 2024 · 0 comments
Open

Possible confusion in the docs' tutorial 1 #1509

n1colassilva opened this issue Mar 27, 2024 · 0 comments

Comments

@n1colassilva
Copy link

In following tutorial01 from the docs users may run into confusion relating to knowing where to put code, specifically in this step:

The next step is to point the root URLconf at the polls.urls module. In mysite/urls.py, add an import for django.urls.include and insert an include() in the urlpatterns list, so you have:

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

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

The user might think that he's supposed to go to the project and create a urls file and insert that code instead of going into mysite/mysite/urls

Possible solutions

  1. In the code blocks use an absolute path, as in, instead of "polls/urls.py" write "mysite/polls/urls.py". I think this may cause confusion elsewhere as now a reader may think its supposed to be under "mysite/mysite", ill still leave this on the table.
  2. Add one of those info blocks or make it clearer in the documentation that you are supposed to add the code to "mysite/mysite/urls.py"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant