Add basic CRUD.
This commit is contained in:
parent
ad80eba311
commit
aceb30e530
11 changed files with 453 additions and 0 deletions
|
|
@ -110,6 +110,19 @@ class BaseResponse(object):
|
|||
def _get_param(self, param_name):
|
||||
return self.querystring.get(param_name, [None])[0]
|
||||
|
||||
def _get_int_param(self, param_name):
|
||||
val = self._get_param(param_name)
|
||||
if val is not None:
|
||||
return int(val)
|
||||
|
||||
def _get_bool_param(self, param_name):
|
||||
val = self._get_param(param_name)
|
||||
if val is not None:
|
||||
if val.lower() == 'true':
|
||||
return True
|
||||
elif val.lower() == 'false':
|
||||
return False
|
||||
|
||||
def _get_multi_param(self, param_prefix):
|
||||
if param_prefix.endswith("."):
|
||||
prefix = param_prefix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue