summaryrefslogtreecommitdiff
path: root/docs/designdefense.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/designdefense.rst')
-rw-r--r--docs/designdefense.rst36
1 files changed, 18 insertions, 18 deletions
diff --git a/docs/designdefense.rst b/docs/designdefense.rst
index 0e4784c66..c437f18d9 100644
--- a/docs/designdefense.rst
+++ b/docs/designdefense.rst
@@ -374,14 +374,14 @@ which don't use interfaces. Instead, each predicate uses a
domain-specific string as a match value.
For example, to write a view configuration which matches only requests
-with the ``POST`` HTTP request method, you might write a ``@bfg_view``
+with the ``POST`` HTTP request method, you might write a ``@view_config``
decorator which mentioned the ``request_method`` predicate:
.. code-block:: python
:linenos:
- from pyramid.view import bfg_view
- @bfg_view(name='post_view', request_method='POST', renderer='json')
+ from pyramid.view import view_config
+ @view_config(name='post_view', request_method='POST', renderer='json')
def post_view(request):
return 'POSTed'
@@ -392,8 +392,8 @@ response:
.. code-block:: python
:linenos:
- from pyramid.view import bfg_view
- @bfg_view(name='post_view', request_method='POST', accept='application/json',
+ from pyramid.view import view_config
+ @view_config(name='post_view', request_method='POST', accept='application/json',
renderer='json')
def post_view(request):
return 'POSTed'
@@ -417,13 +417,13 @@ acommodate this by allowing people to define "custom" view predicates:
.. code-block:: python
:linenos:
- from pyramid.view import bfg_view
+ from pyramid.view import view_config
from webob import Response
def subpath(context, request):
return request.subpath and request.subpath[0] == 'abc'
- @bfg_view(custom_predicates=(subpath,))
+ @view_config(custom_predicates=(subpath,))
def aview(request):
return Response('OK')
@@ -760,7 +760,7 @@ code.
Pyramid Is Too Big
------------------
-"The :mod:`pyramid` compressed tarball is 1MB. It must be
+"The :mod:`pyramid` compressed tarball is almost 2MB. It must be
enormous!"
No. We just ship it with test code and helper templates. Here's a
@@ -768,26 +768,26 @@ breakdown of what's included in subdirectories of the package tree:
docs/
- 2.2MB
+ 3.0MB
-repoze/bfg/tests
+pyramid/tests/
- 580KB
+ 1.1MB
-repoze/bfg/paster_templates
+pyramid/paster_templates/
- 372KB
+ 804KB
-repoze/bfg (except for ``repoze/bfg/tests and repoze/bfg/paster_templates``)
+pyramid/ (except for ``pyramd/tests and pyramid/paster_templates``)
- 316K
+ 539K
-The actual :mod:`pyramid` runtime code is about 10% of the total
-size of the tarball omitting docs, helper templates used for package
+The actual :mod:`pyramid` runtime code is about 10% of the total size
+of the tarball omitting docs, helper templates used for package
generation, and test code. Of the approximately 13K lines of Python
code in the package, the code that actually has a chance of executing
during normal operation, excluding tests and paster template Python
-files, accounts for approximately 3K lines of Python code. This is
+files, accounts for approximately 5K lines of Python code. This is
comparable to Pylons, which ships with a little over 2K lines of
Python code, excluding tests.