Skip to content

Commit 744548f

Browse files
Added missing request argument in some documentation examples (Fixes miguelgrinberg#163)
1 parent d46d295 commit 744548f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/microdot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ def run(self, host='0.0.0.0', port=5000, debug=False, ssl=None):
10741074
app = Microdot()
10751075
10761076
@app.route('/')
1077-
def index():
1077+
def index(request):
10781078
return 'Hello, world!'
10791079
10801080
app.run(debug=True)

src/microdot_asyncio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ async def start_server(self, host='0.0.0.0', port=5000, debug=False,
241241
app = Microdot()
242242
243243
@app.route('/')
244-
async def index():
244+
async def index(request):
245245
return 'Hello, world!'
246246
247247
async def main():
@@ -313,7 +313,7 @@ def run(self, host='0.0.0.0', port=5000, debug=False, ssl=None):
313313
app = Microdot()
314314
315315
@app.route('/')
316-
async def index():
316+
async def index(request):
317317
return 'Hello, world!'
318318
319319
app.run(debug=True)

0 commit comments

Comments
 (0)