reduced boilerplate code in static_pages views