mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
add missing includes in result fomatting example
This commit is contained in:
@@ -66,6 +66,8 @@ For example, let us extend the result for the status call in text format
|
||||
and add the server URL. Such a formatter would look like this:
|
||||
|
||||
``` python
|
||||
from nominatim_api import StatusResult
|
||||
|
||||
@dispatch.format_func(StatusResult, 'text')
|
||||
def _format_status_text(result, _):
|
||||
header = 'Status for server nominatim.openstreetmap.org'
|
||||
@@ -86,6 +88,8 @@ as adding formatting functions for all result types using the custom
|
||||
format name:
|
||||
|
||||
``` python
|
||||
from nominatim_api import StatusResult
|
||||
|
||||
@dispatch.format_func(StatusResult, 'chatty')
|
||||
def _format_status_text(result, _):
|
||||
if result.status:
|
||||
|
||||
Reference in New Issue
Block a user