Fix code blocks syntax in cherrypy._helper
@@ -83,6 +83,9 @@ def popargs(*args, **kwargs):
This decorator may be used in one of two ways:
As a class decorator:
+
+ .. code-block:: python
+
@cherrypy.popargs('year', 'month', 'day')
class Blog:
def index(self, year=None, month=None, day=None):
@@ -91,10 +94,13 @@ def popargs(*args, **kwargs):
#will fill in the appropriate parameters.
def create(self):
- #This link will still be available at /create. Defined functions
- #take precedence over arguments.
+ #This link will still be available at /create.
+ #Defined functions take precedence over arguments.
Or as a member of a class:
+
+ .. code-block:: python
+
class Blog:
_cp_dispatch = cherrypy.popargs('year', 'month', 'day')
#...
@@ -103,6 +109,8 @@ def popargs(*args, **kwargs):
For instance, the following setup allows different activities at the
day, month, and year level:
+ .. code-block:: python
+
class DayHandler:
def index(self, year, month, day):
#Do something with this day; probably list entries
