Looking at the Firefox Network tab, this seems to fire 2 redirects when you ask for /code/: one to /code/source, and then another from there to /code/source/. So Flask appears to like trailing slashes. Let's add one here to save the second redirect.

Oh, and put triple quotes around the docstring for consistency.