pando.py
pando.py copied to clipboard
add an error_root knob
Right now Aspen looks for error simplates in the project_root. That's okay as a default, but we should provide a way to specify a different directory for that. As with project_root and www_root, error_root should be relative to cwd.
Depending on #142, maybe we go with --fallback_root instead, as this would also cover autoindexes.
I'm going to discuss on #142, and this ticket can follow whatever we decided there.
+1 from @techtonik in #399.
Confirming +1. =) It makes sense to name this similar to template dir, like www_error_root, falling back www_root if does not exist.
We don't use www_root for error templates. We use project_root.
I don't think that error templates are so special to be treated differently than standard pages. For me they belong to templates namespace.
We don't use www_root for error templates. We use project_root.
Why not www_root for error templates?
because then they collide with the webpage namespace. Do you want your 404 page to also be /404 on your website?
Considering that 404 page is an ordinary web page, I don't see any problems with that. If there is way in Aspen to protect certain parts of the site from direct URL access, it can be used. Being able to configure where 404 page is fetched from may be useful to place it into www_root/errorpages/404, but placing it outside of www_root adds additional security risk to consider.