Merge pull request #289 from seemethere/update_request_form_getitem

Update request.form to work with __getitem__
This commit is contained in:
Eli Uriegas 2017-01-11 17:02:45 -06:00 committed by GitHub
commit cf60ebd988
2 changed files with 3 additions and 0 deletions

View File

@ -25,6 +25,9 @@ class RequestParameters(dict):
self.super = super()
self.super.__init__(*args, **kwargs)
def __getitem__(self, name):
return self.get(name)
def get(self, name, default=None):
values = self.super.get(name)
return values[0] if values else default