Commit 492c2c28 authored by sarsonl's avatar sarsonl
Browse files

Addition Flask-Migrate

Flask migrate functionality was added as this might be required in
the future of using postresql. Some print statements were removed
with this commit.
parent ddba6dc8
......@@ -52,6 +52,7 @@ filter_boreholes = [
class DynamicQuery(object):
"""
Dynamic filtering and of query.
......
......@@ -170,10 +170,9 @@ class KeywordParser(object):
schemas = [schemas]
valid_fields = set()
print("parse ##########")
for schema in [s() if inspect.isclass(s) else s for s in schemas]:
valid_fields.update(schema.fields.keys())
print("#########################", schema.fields.keys())
parsers = []
for l in locations:
......@@ -196,7 +195,7 @@ class KeywordParser(object):
req_args.update(f(req))
invalid_args = req_args.difference(valid_fields)
print('#######', valid_fields, req_args)
if invalid_args:
err = ValidationError(
'Invalid request query parameters: {}'.format(
......
......@@ -32,7 +32,8 @@ _install_requires = [
'Flask-RESTful>=0.3.7',
'Flask-SQLAlchemy>=2.3.2',
'marshmallow>=3.0.0rc5',
'webargs>=5.3.0', ]
'webargs>=5.3.0',
'Flask-Migrate>=2.4.0',]
_data_files = [
('', ['LICENSE'])]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment