summaryrefslogtreecommitdiff
path: root/docs/narr/MyProject
diff options
context:
space:
mode:
authorBert JW Regeer <bertjw@regeer.org>2016-01-03 02:03:24 -0700
committerBert JW Regeer <bertjw@regeer.org>2016-01-03 02:03:24 -0700
commit30ae71b4a7ad97a649165374a75a70f4b64ae25c (patch)
treeb8a2cd06ff0130fd31b702862db2e46d39cd4e71 /docs/narr/MyProject
parent504027873ab0e1b15601e2d1900ef8a4469f6a43 (diff)
parent5558386fd1a6181b2e8ad06659049c055a7ed023 (diff)
downloadpyramid-30ae71b4a7ad97a649165374a75a70f4b64ae25c.tar.gz
pyramid-30ae71b4a7ad97a649165374a75a70f4b64ae25c.tar.bz2
pyramid-30ae71b4a7ad97a649165374a75a70f4b64ae25c.zip
Merge branch 'master' into feature/configurable-view-deriver
Diffstat (limited to 'docs/narr/MyProject')
-rw-r--r--docs/narr/MyProject/development.ini6
-rw-r--r--docs/narr/MyProject/myproject/templates/mytemplate.pt13
-rw-r--r--docs/narr/MyProject/myproject/tests.py25
-rw-r--r--docs/narr/MyProject/production.ini2
-rw-r--r--docs/narr/MyProject/setup.py45
5 files changed, 28 insertions, 63 deletions
diff --git a/docs/narr/MyProject/development.ini b/docs/narr/MyProject/development.ini
index a9a26e56b..749e574eb 100644
--- a/docs/narr/MyProject/development.ini
+++ b/docs/narr/MyProject/development.ini
@@ -11,7 +11,7 @@ pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.default_locale_name = en
-pyramid.includes =
+pyramid.includes =
pyramid_debugtoolbar
# By default, the toolbar only appears for clients from IP addresses
@@ -24,7 +24,7 @@ pyramid.includes =
[server:main]
use = egg:waitress#main
-host = 0.0.0.0
+host = 127.0.0.1
port = 6543
###
@@ -57,4 +57,4 @@ level = NOTSET
formatter = generic
[formatter_generic]
-format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
+format = %(asctime)s %(levelname)-5.5s [%(name)s:%(lineno)s][%(threadName)s] %(message)s
diff --git a/docs/narr/MyProject/myproject/templates/mytemplate.pt b/docs/narr/MyProject/myproject/templates/mytemplate.pt
index e6b00a145..65d7f0609 100644
--- a/docs/narr/MyProject/myproject/templates/mytemplate.pt
+++ b/docs/narr/MyProject/myproject/templates/mytemplate.pt
@@ -8,12 +8,12 @@
<meta name="author" content="Pylons Project">
<link rel="shortcut icon" href="${request.static_url('myproject:static/pyramid-16x16.png')}">
- <title>Starter Template for The Pyramid Web Framework</title>
+ <title>Starter Scaffold for The Pyramid Web Framework</title>
<!-- Bootstrap core CSS -->
<link href="//oss.maxcdn.com/libs/twitter-bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
- <!-- Custom styles for this template -->
+ <!-- Custom styles for this scaffold -->
<link href="${request.static_url('myproject:static/theme.css')}" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
@@ -33,19 +33,20 @@
</div>
<div class="col-md-10">
<div class="content">
- <h1><span class="font-semi-bold">Pyramid</span> <span class="smaller">starter template</span></h1>
- <p class="lead">Welcome to <span class="font-normal">${project}</span>, an&nbsp;application generated&nbsp;by<br>the <span class="font-normal">Pyramid Web Framework</span>.</p>
+ <h1><span class="font-semi-bold">Pyramid</span> <span class="smaller">Starter scaffold</span></h1>
+ <p class="lead">Welcome to <span class="font-normal">${project}</span>, an&nbsp;application generated&nbsp;by<br>the <span class="font-normal">Pyramid Web Framework 1.6b2</span>.</p>
</div>
</div>
</div>
<div class="row">
<div class="links">
<ul>
- <li class="current-version">Currently v1.5</li>
- <li><i class="glyphicon glyphicon-bookmark icon-muted"></i><a href="http://docs.pylonsproject.org">Docs</a></li>
+ <li class="current-version">Generated by v1.6b2</li>
+ <li><i class="glyphicon glyphicon-bookmark icon-muted"></i><a href="http://docs.pylonsproject.org/projects/pyramid/en/1.6-branch/">Docs</a></li>
<li><i class="glyphicon glyphicon-cog icon-muted"></i><a href="https://github.com/Pylons/pyramid">Github Project</a></li>
<li><i class="glyphicon glyphicon-globe icon-muted"></i><a href="irc://irc.freenode.net#pyramid">IRC Channel</a></li>
<li><i class="glyphicon glyphicon-home icon-muted"></i><a href="http://pylonsproject.org">Pylons Project</a></li>
+ </ul>
</div>
</div>
<div class="row">
diff --git a/docs/narr/MyProject/myproject/tests.py b/docs/narr/MyProject/myproject/tests.py
index 8c60407e5..37df08a2a 100644
--- a/docs/narr/MyProject/myproject/tests.py
+++ b/docs/narr/MyProject/myproject/tests.py
@@ -16,31 +16,6 @@ class ViewTests(unittest.TestCase):
info = my_view(request)
self.assertEqual(info['project'], 'MyProject')
-class ViewIntegrationTests(unittest.TestCase):
- def setUp(self):
- """ This sets up the application registry with the
- registrations your application declares in its ``includeme``
- function.
- """
- self.config = testing.setUp()
- self.config.include('myproject')
-
- def tearDown(self):
- """ Clear out the application registry """
- testing.tearDown()
-
- def test_my_view(self):
- from myproject.views import my_view
- request = testing.DummyRequest()
- result = my_view(request)
- self.assertEqual(result.status, '200 OK')
- body = result.app_iter[0]
- self.assertTrue('Welcome to' in body)
- self.assertEqual(len(result.headerlist), 2)
- self.assertEqual(result.headerlist[0],
- ('Content-Type', 'text/html; charset=UTF-8'))
- self.assertEqual(result.headerlist[1], ('Content-Length',
- str(len(body))))
class FunctionalTests(unittest.TestCase):
def setUp(self):
diff --git a/docs/narr/MyProject/production.ini b/docs/narr/MyProject/production.ini
index 9eae9e03f..3ccbe6619 100644
--- a/docs/narr/MyProject/production.ini
+++ b/docs/narr/MyProject/production.ini
@@ -51,4 +51,4 @@ level = NOTSET
formatter = generic
[formatter_generic]
-format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
+format = %(asctime)s %(levelname)-5.5s [%(name)s:%(lineno)s][%(threadName)s] %(message)s
diff --git a/docs/narr/MyProject/setup.py b/docs/narr/MyProject/setup.py
index 9f34540a7..8c019af51 100644
--- a/docs/narr/MyProject/setup.py
+++ b/docs/narr/MyProject/setup.py
@@ -1,42 +1,30 @@
-"""Setup for the MyProject package.
-
-"""
import os
-from setuptools import setup, find_packages
-
-
-HERE = os.path.abspath(os.path.dirname(__file__))
-
-with open(os.path.join(HERE, 'README.txt')) as fp:
- README = fp.read()
-
-
-with open(os.path.join(HERE, 'CHANGES.txt')) as fp:
- CHANGES = fp.read()
+from setuptools import setup, find_packages
+here = os.path.abspath(os.path.dirname(__file__))
+with open(os.path.join(here, 'README.txt')) as f:
+ README = f.read()
+with open(os.path.join(here, 'CHANGES.txt')) as f:
+ CHANGES = f.read()
-REQUIRES = [
+requires = [
'pyramid',
'pyramid_chameleon',
'pyramid_debugtoolbar',
'waitress',
]
-TESTS_REQUIRE = [
- 'webtest'
- ]
-
setup(name='MyProject',
version='0.0',
description='MyProject',
long_description=README + '\n\n' + CHANGES,
classifiers=[
- 'Programming Language :: Python',
- 'Framework :: Pyramid',
- 'Topic :: Internet :: WWW/HTTP',
- 'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
- ],
+ "Programming Language :: Python",
+ "Framework :: Pyramid",
+ "Topic :: Internet :: WWW/HTTP",
+ "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
+ ],
author='',
author_email='',
url='',
@@ -44,10 +32,11 @@ setup(name='MyProject',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
- install_requires=REQUIRES,
- tests_require=TESTS_REQUIRE,
- test_suite='myproject',
+ install_requires=requires,
+ tests_require=requires,
+ test_suite="myproject",
entry_points="""\
[paste.app_factory]
main = myproject:main
- """)
+ """,
+ )