Template Namespace Error (django2)

14 views
Skip to first unread message

Carl Brubaker

unread,
Jan 29, 2018, 11:44:39 PM1/29/18
to Django users
I'm going through the Mozilla Django tutorial and I can't get the template namespacing to work. If I leave the templates in the "templates" folder, all is well. When I try to move them to the "templates/catalog" folder it's nothing but errors. I think it might have something to with the "base_generic.html" file location. I've compared it to the official Django2 tutorial, made some changes, which I think fixed the error, because it caused different errors. Tutorial here: Mozilla Django2. Mozilla does not mention namespacing, so without attempting to do so, all is well. Any help greatly appreciated.

I know someone will inevitably mention Django Girls. They are still on Django 1, or I probably would have already done it.


Thanks!

Carl Brubaker

unread,
Jan 30, 2018, 11:15:04 PM1/30/18
to Django users
So I'm not exactly sure what happened. I made a second "locallibrary" program that worked and then compared all of my files, because after I tried to change my original one back to the way Mozilla lays it out, it still wouldn't work. When I repasted the catalog/views.py file contents, it worked again. I then went one step at a time to make the namespacing, and now it works just fine.
Reply all
Reply to author
Forward
0 new messages