pando.py icon indicating copy to clipboard operation
pando.py copied to clipboard

add an error_root knob

Open chadwhitacre opened this issue 12 years ago • 9 comments

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.

chadwhitacre avatar Jan 16 '13 15:01 chadwhitacre

Depending on #142, maybe we go with --fallback_root instead, as this would also cover autoindexes.

chadwhitacre avatar Jan 16 '13 15:01 chadwhitacre

I'm going to discuss on #142, and this ticket can follow whatever we decided there.

chadwhitacre avatar Jan 16 '13 15:01 chadwhitacre

+1 from @techtonik in #399.

chadwhitacre avatar Nov 05 '14 22:11 chadwhitacre

Confirming +1. =) It makes sense to name this similar to template dir, like www_error_root, falling back www_root if does not exist.

techtonik avatar Nov 05 '14 23:11 techtonik

We don't use www_root for error templates. We use project_root.

chadwhitacre avatar Nov 05 '14 23:11 chadwhitacre

I don't think that error templates are so special to be treated differently than standard pages. For me they belong to templates namespace.

techtonik avatar Nov 05 '14 23:11 techtonik

We don't use www_root for error templates. We use project_root.

Why not www_root for error templates?

techtonik avatar Jun 19 '15 13:06 techtonik

because then they collide with the webpage namespace. Do you want your 404 page to also be /404 on your website?

pjz avatar Jun 19 '15 19:06 pjz

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.

techtonik avatar Jun 19 '15 20:06 techtonik