Congratulations on making it nearly to the end of this section! Here’s what you did:
- Used the Django ORM in the shell and in
views.py - Learned about primary keys (pk)
- Used angle brackets in your
urls.pypath objects in order to be able to capture specific parts of a URL and pass them forward as arguments - Used an
int:path converter to verify the URL path’s datatype - Defined proper namespaces for linking and reverse URL matching
- Passed objects inside URL template tags
- Debugged the
NoReverseMatcherror - Learned about template inheritance
- Styled with Bootstrap
- Made the site mobile responsive
- Used the Django admin interface
On top of all that, you also have a functioning portfolio site that you can show to potential employers!
Martin Breuss RP Team on July 26, 2021
Hm… @KatMac how does your
portfolio/urls.pyfile in your management app look like where you’re routing toprojects/urls.py?When you look at the error message you’re getting, it seems that there’s an additional
/projectspart snipped off your URL path:The first part shown is the URL you’re expecting, but there’s another one after it. It looks just like the
<int:pk>that Django snips off if there’d be a number instead.So it seems you’ve defined the routing from
portfolio/urls.pytoprojects/urls.pyalready with the path"projects/", which is why you’d get a doubleprojects/URL here, with the second part snipped off.What happens when you keep an empty path in
projects/urls.py:Let me know whether that fixes it, and if so, give me your interpretation on why it does. :)