mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
parent
bf82b3d6a6
commit
6e26b05799
1 changed files with 1 additions and 1 deletions
|
|
@ -530,7 +530,7 @@ Return a list of ``(regex, view_function)`` pairs, something like this:
|
||||||
@hookimpl
|
@hookimpl
|
||||||
def register_routes():
|
def register_routes():
|
||||||
return [
|
return [
|
||||||
(r"^/hello-from/(?P<name>.*)$"), hello_from)
|
(r"^/hello-from/(?P<name>.*)$", hello_from)
|
||||||
]
|
]
|
||||||
|
|
||||||
The view functions can take a number of different optional arguments. The corresponding argument will be passed to your function depending on its named parameters - a form of dependency injection.
|
The view functions can take a number of different optional arguments. The corresponding argument will be passed to your function depending on its named parameters - a form of dependency injection.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue