Fixes for apidoc
This commit is contained in:
parent
a84a2b51ff
commit
7c5af27ecf
3 changed files with 13 additions and 2 deletions
|
|
@ -135,8 +135,12 @@ def start_app():
|
|||
|
||||
if not os.path.isfile(file_path):
|
||||
#file_path=workdir+'/modules/'+module+'/media/'+media_file
|
||||
|
||||
if not module in arr_module_path:
|
||||
abort(404)
|
||||
|
||||
file_path=arr_module_path[module]+'/media/'+media_file
|
||||
|
||||
|
||||
if not os.path.isfile(file_path):
|
||||
abort(404)
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ class PhangoField:
|
|||
|
||||
Attributes:
|
||||
name (str): The name of the field
|
||||
jtype(Python type): The type of value in python
|
||||
label (str): A label or generic name for use in text labels used for representate the field
|
||||
required (bool): If the field is required or not.
|
||||
size (int): The size of sql field.
|
||||
|
|
@ -54,6 +55,10 @@ class PhangoField:
|
|||
|
||||
self.name=name
|
||||
|
||||
# The type of the field in javascript. Util for api documentation
|
||||
|
||||
self.jtype='string'
|
||||
|
||||
# The label for the Field
|
||||
|
||||
self.label=name.replace('_', ' ').title()
|
||||
|
|
@ -147,6 +152,8 @@ class PhangoField:
|
|||
self.help=''
|
||||
|
||||
self.type_sql='varchar({})'.format(self.size)
|
||||
|
||||
|
||||
|
||||
def get_type_sql(self):
|
||||
"""This method is used for describe the new field in a sql language format."""
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ def db(f):
|
|||
|
||||
"""Wrapper function for add db connection to your flask function
|
||||
|
||||
Wrapper function for add db connection to your flask function. Also close the connection if error or function exection is finished.
|
||||
Wrapper function for add db connection to your flask function. Also close the connection if error or function exception is finished.
|
||||
|
||||
Args:
|
||||
*args (mixed): The args of function
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue