Skip to content

Commit

Permalink
html-ids: update README with check id info
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugenia Soldatenkova committed Apr 1, 2021
1 parent 8e94ede commit 7c7c603
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.rst
Expand Up @@ -144,6 +144,21 @@ Checks take no arguments, and must return a ``dict`` whose keys are applied to t
def my_check():
return {'x': 1}


By default stacktrace buttons and modal popups on ``/status/dashboard/`` page have a slugified name as HTML id. You can also define some custom id to identify elements in HTML separately from their display names, for example when slugifying does something completely unreadable::

@check
def check_redis():
return {
"127.0.0.1:1234/0": {
"ok": True,
"id": "some-custom-redis-html-id",
# because `slugify` makes '12700112340'
}
}



In the absence of any checks, a 404 is thrown, which is then handled by the
``json_view`` decorator.

Expand Down

0 comments on commit 7c7c603

Please sign in to comment.