Steve Piercy
2016-12-25 5fadd8838d922ccbd084421af51715992bce12ee
quick_tour - "Databases" updates for cookiecutter
- add ALL src files
5 files added
24 ■■■■■ changed files
docs/quick_tour/sqla_demo/.coveragerc 3 ●●●●● patch | view | raw | blame | history
docs/quick_tour/sqla_demo/pytest.ini 3 ●●●●● patch | view | raw | blame | history
docs/quick_tour/sqla_demo/sqla_demo/routes.py 3 ●●●●● patch | view | raw | blame | history
docs/quick_tour/sqla_demo/sqla_demo/templates/404.jinja2 8 ●●●●● patch | view | raw | blame | history
docs/quick_tour/sqla_demo/sqla_demo/views/notfound.py 7 ●●●●● patch | view | raw | blame | history
docs/quick_tour/sqla_demo/.coveragerc
New file
@@ -0,0 +1,3 @@
[run]
source = sqla_demo
omit = sqla_demo/test*
docs/quick_tour/sqla_demo/pytest.ini
New file
@@ -0,0 +1,3 @@
[pytest]
testpaths = sqla_demo
python_files = *.py
docs/quick_tour/sqla_demo/sqla_demo/routes.py
New file
@@ -0,0 +1,3 @@
def includeme(config):
    config.add_static_view('static', 'static', cache_max_age=3600)
    config.add_route('home', '/')
docs/quick_tour/sqla_demo/sqla_demo/templates/404.jinja2
New file
@@ -0,0 +1,8 @@
{% extends "layout.jinja2" %}
{% block content %}
<div class="content">
  <h1><span class="font-semi-bold">Pyramid</span> <span class="smaller">Alchemy scaffold</span></h1>
  <p class="lead"><span class="font-semi-bold">404</span> Page Not Found</p>
</div>
{% endblock content %}
docs/quick_tour/sqla_demo/sqla_demo/views/notfound.py
New file
@@ -0,0 +1,7 @@
from pyramid.view import notfound_view_config
@notfound_view_config(renderer='../templates/404.jinja2')
def notfound_view(request):
    request.response.status = 404
    return {}