Skip to content

Commit

Permalink
Merge pull request #220 from cclauss/patch-1
Browse files Browse the repository at this point in the history
IndentationError in ./docs/pylons/code/pyramid_handlers.py
  • Loading branch information
mmerickel committed Jan 30, 2019
2 parents 467fdfe + 0b7d243 commit 86e5a40
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions docs/pylons/code/pyramid_handlers.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# In the top-level __init__.py
from .handlers import Hello
def main(global_config, **settings):
...
config.include("pyramid_handlers")
config.add_handler("hello", "/hello/{action}", handler=Hello)
# In the top-level __init__.py
from .handlers import Hello
def main(global_config, **settings):
...
config.include("pyramid_handlers")
config.add_handler("hello", "/hello/{action}", handler=Hello)

# In zzz/handlers.py
from pyramid_handlers import action
class Hello(object):
__autoexpose__ = None
# In zzz/handlers.py
from pyramid_handlers import action
class Hello(object):
__autoexpose__ = None

def __init__(self, request):
self.request = request
def __init__(self, request):
self.request = request

@action
def index(self):
return Response('Hello world!')
@action
def index(self):
return Response('Hello world!')

@action(renderer="mytemplate.mak")
def bye(self):
return {}
@action(renderer="mytemplate.mak")
def bye(self):
return {}

0 comments on commit 86e5a40

Please sign in to comment.