Side note #1: Generally speaking, you want your get_absolute_url
to identify a particular instance of the model. Reversing a static url is going to generate the same url for everyone. See the docs and examples at get_absolute_url
Side note #2: When fencing off blocks of code, you use three backtick - ` characters on lines by themselves. (They can’t be parts of existing lines.) This means you’ll have a line of ```, then the code for a file, then another line of ```. (I’ve taken the liberty of fixing this post for you.)
Please post the complete error message you are receiving, along with the traceback.