Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Gul Asnani15,138 Points
Urls after recreation
After adding steps in a course, it throws an error for the newly created steps. The older ones, that is, the ones written before adding this url, work perfectly fine!
Haydar Al-Rikabi5,971 Points
This is because you are not entering the right step pk in the url. Many people confuse the pk number with the "order" number. The pk number is not shown in the fields within the admin site. It is rather saved in the database.
To check the pk number of the newly created step:
- In the admin site, click on "steps".
- Click on any step in the list.
- You will see in your browser's address bar a url address that looks like this: http://127.0.0.1:8000/admin/courses/question/1/change/
The pk number is the one that comes before the word "change" in the end of the url.
I have the exact same problem.