Steve Piercy
2016-12-23 e03ea9265b809f783094799e67ae9e00e09085b1
wiki/src/views updates
1 files deleted
2 files added
8 files modified
183 ■■■■■ changed files
docs/tutorials/wiki/src/views/.coveragerc 3 ●●●●● patch | view | raw | blame | history
docs/tutorials/wiki/src/views/CHANGES.txt 2 ●●● patch | view | raw | blame | history
docs/tutorials/wiki/src/views/README.txt 27 ●●●● patch | view | raw | blame | history
docs/tutorials/wiki/src/views/development.ini 7 ●●●● patch | view | raw | blame | history
docs/tutorials/wiki/src/views/production.ini 8 ●●●● patch | view | raw | blame | history
docs/tutorials/wiki/src/views/pytest.ini 3 ●●●●● patch | view | raw | blame | history
docs/tutorials/wiki/src/views/setup.py 60 ●●●● patch | view | raw | blame | history
docs/tutorials/wiki/src/views/tutorial/__init__.py 2 ●●●●● patch | view | raw | blame | history
docs/tutorials/wiki/src/views/tutorial/templates/mytemplate.pt 67 ●●●●● patch | view | raw | blame | history
docs/tutorials/wiki/src/views/tutorial/tests.py 2 ●●● patch | view | raw | blame | history
docs/tutorials/wiki/src/views/tutorial/views.py 2 ●●● patch | view | raw | blame | history
docs/tutorials/wiki/src/views/.coveragerc
New file
@@ -0,0 +1,3 @@
[run]
source = tutorial
omit = tutorial/test*
docs/tutorials/wiki/src/views/CHANGES.txt
@@ -1,4 +1,4 @@
0.0
---
-  Initial version
- Initial version.
docs/tutorials/wiki/src/views/README.txt
@@ -1,12 +1,29 @@
tutorial README
==================
myproj
===============================
Getting Started
---------------
- cd <directory containing this file>
- Change directory into your newly created project.
- $VENV/bin/pip install -e .
    cd myproj
- $VENV/bin/pserve development.ini
- Create a Python virtual environment.
    python3 -m venv env
- Upgrade packaging tools.
    env/bin/pip install --upgrade pip setuptools wheel
- Install the project in editable mode with its testing requirements.
    env/bin/pip install -e ".[testing]"
- Run your project's tests.
    env/bin/pytest
- Run your project.
    env/bin/pserve development.ini
docs/tutorials/wiki/src/views/development.ini
@@ -1,6 +1,6 @@
###
# app configuration
# http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/environment.html
# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html
###
[app:main]
@@ -13,10 +13,7 @@
pyramid.default_locale_name = en
pyramid.includes =
    pyramid_debugtoolbar
    pyramid_zodbconn
    pyramid_tm
tm.attempts = 3
zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000
# By default, the toolbar only appears for clients from IP addresses
@@ -33,7 +30,7 @@
###
# logging configuration
# http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/logging.html
# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html
###
[loggers]
docs/tutorials/wiki/src/views/production.ini
@@ -1,6 +1,6 @@
###
# app configuration
# http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/environment.html
# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html
###
[app:main]
@@ -11,11 +11,7 @@
pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.default_locale_name = en
pyramid.includes =
    pyramid_tm
    pyramid_zodbconn
tm.attempts = 3
zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000
###
@@ -28,7 +24,7 @@
###
# logging configuration
# http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/logging.html
# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html
###
[loggers]
docs/tutorials/wiki/src/views/pytest.ini
New file
@@ -0,0 +1,3 @@
[pytest]
testpaths = tutorial
python_files = *.py
docs/tutorials/wiki/src/views/setup.py
@@ -18,37 +18,39 @@
    'ZODB3',
    'waitress',
    'docutils',
    ]
]
tests_require = [
    'WebTest >= 1.3.1',  # py3 compat
    'pytest',  # includes virtualenv
    'pytest',
    'pytest-cov',
    ]
]
setup(name='tutorial',
      version='0.0',
      description='tutorial',
      long_description=README + '\n\n' + CHANGES,
      classifiers=[
          "Programming Language :: Python",
          "Framework :: Pyramid",
          "Topic :: Internet :: WWW/HTTP",
          "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
      ],
      author='',
      author_email='',
      url='',
      keywords='web pylons pyramid',
      packages=find_packages(),
      include_package_data=True,
      zip_safe=False,
      extras_require={
          'testing': tests_require,
      },
      install_requires=requires,
      entry_points="""\
      [paste.app_factory]
      main = tutorial:main
      """,
      )
setup(
    name='tutorial',
    version='0.0',
    description='myproj',
    long_description=README + '\n\n' + CHANGES,
    classifiers=[
        'Programming Language :: Python',
        'Framework :: Pyramid',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
    ],
    author='',
    author_email='',
    url='',
    keywords='web pyramid pylons',
    packages=find_packages(),
    include_package_data=True,
    zip_safe=False,
    extras_require={
        'testing': tests_require,
    },
    install_requires=requires,
    entry_points={
        'paste.app_factory': [
            'main = tutorial:main',
        ],
    },
)
docs/tutorials/wiki/src/views/tutorial/__init__.py
@@ -13,6 +13,8 @@
    """
    config = Configurator(root_factory=root_factory, settings=settings)
    config.include('pyramid_chameleon')
    config.include('pyramid_tm')
    config.include('pyramid_zodbconn')
    config.add_static_view('static', 'static', cache_max_age=3600)
    config.scan()
    return config.make_wsgi_app()
docs/tutorials/wiki/src/views/tutorial/templates/mytemplate.pt
File was deleted
docs/tutorials/wiki/src/views/tutorial/tests.py
@@ -14,4 +14,4 @@
        from .views import my_view
        request = testing.DummyRequest()
        info = my_view(request)
        self.assertEqual(info['project'], 'tutorial')
        self.assertEqual(info['project'], 'myproj')
docs/tutorials/wiki/src/views/tutorial/views.py
@@ -57,4 +57,4 @@
        return HTTPFound(location = request.resource_url(context))
    return dict(page=context,
                save_url=request.resource_url(context, 'edit_page'))
                save_url=request.resource_url(context, 'edit_page'))