From b33dcac47dc0e759cd77a1548d8b38663a977df0 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 24 Dec 2010 16:22:55 -0500 Subject: - Fix API documentation rendering for ``pyramid.view.static`` --- CHANGES.txt | 2 ++ docs/api/view.rst | 1 + pyramid/tests/test_static.py | 2 +- pyramid/view.py | 6 ++++-- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index eef001f73..6932a0c25 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -59,6 +59,8 @@ Documentation - Changed the "ZODB + Traversal Wiki Tutorial" based on changes to ``pyramid_zodb`` Paster template. +- Fix API documentation rendering for ``pyramid.view.static`` + 1.0a7 (2010-12-20) ================== diff --git a/docs/api/view.rst b/docs/api/view.rst index 0057cca4a..4dddea25f 100644 --- a/docs/api/view.rst +++ b/docs/api/view.rst @@ -18,6 +18,7 @@ .. autoclass:: static :members: + :inherited-members: .. autofunction:: append_slash_notfound_view(context, request) diff --git a/pyramid/tests/test_static.py b/pyramid/tests/test_static.py index f7ae6e1a5..33bd51d31 100644 --- a/pyramid/tests/test_static.py +++ b/pyramid/tests/test_static.py @@ -153,7 +153,7 @@ class TestPackageURLParser(unittest.TestCase): self.failUnless('404 Not Found' in body) self.assertEqual(sr.status, '404 Not Found') -class TestStaticView(unittest.TestCase): +class Test_static_view(unittest.TestCase): def setUp(self): cleanUp() diff --git a/pyramid/view.py b/pyramid/view.py index 67329c363..3dc110863 100644 --- a/pyramid/view.py +++ b/pyramid/view.py @@ -19,10 +19,12 @@ from pyramid.interfaces import IView from pyramid.interfaces import IViewClassifier from pyramid.httpexceptions import HTTPFound -from pyramid.static import static_view as static # B/C +from pyramid.static import static_view from pyramid.threadlocal import get_current_registry -static = static # dont yet deprecate this (ever?) +# Nast BW compat hack: dont yet deprecate this (ever?) +class static(static_view): # only subclass for purposes of autodoc + __doc__ = static_view.__doc__ _marker = object() -- cgit v1.2.3