mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
request.full_path property, closes #1184
This commit is contained in:
parent
ed15c9908e
commit
649f48cd70
3 changed files with 38 additions and 5 deletions
|
|
@ -89,6 +89,14 @@ class Request:
|
|||
def query_string(self):
|
||||
return (self.scope.get("query_string") or b"").decode("latin-1")
|
||||
|
||||
@property
|
||||
def full_path(self):
|
||||
qs = self.query_string
|
||||
return "{}{}".format(
|
||||
self.path,
|
||||
('?' + qs) if qs else ''
|
||||
)
|
||||
|
||||
@property
|
||||
def args(self):
|
||||
return MultiParams(parse_qs(qs=self.query_string))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue