diff --git a/doc/content/end-user-documentation/views.rst b/doc/content/end-user-documentation/views.rst index 0c3a8f16..89f87b5d 100644 --- a/doc/content/end-user-documentation/views.rst +++ b/doc/content/end-user-documentation/views.rst @@ -165,6 +165,7 @@ Attributes .. table:: ^Name ^Description + |interactive |(Bool) Is true when the request came in over an websocket connection |method |(String) Contains either 'GET' or 'POST' |GET |(Dict) Contains the URL query |POST |(Dict) Contains POST arguments. Empty in case of GET requests diff --git a/lona/request.py b/lona/request.py index 5affde37..4420fe2d 100644 --- a/lona/request.py +++ b/lona/request.py @@ -15,6 +15,10 @@ def __init__(self, view_runtime, connection): self.method = 'POST' if self.POST else 'GET' + @property + def interactive(self): + return self.connection.interactive + @property def user(self): return getattr(self.connection, 'user', None)