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! While you're at it, check out some resources Treehouse students have shared here.
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 trialGul Asnani
15,138 PointsUrls 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!
1 Answer
Haydar Al-Rikabi
5,971 PointsThis 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.
Paulo Longino
5,017 PointsThanks for the explanation it really helped me
Kyle Salisbury
Full Stack JavaScript Techdegree Student 16,363 PointsKyle Salisbury
Full Stack JavaScript Techdegree Student 16,363 PointsI have the exact same problem.