Fixes for apidoc

This commit is contained in:
Antonio de la Rosa 2025-05-13 01:56:55 +02:00
parent a84a2b51ff
commit 7c5af27ecf
3 changed files with 13 additions and 2 deletions

View file

@ -135,6 +135,10 @@ 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):

View file

@ -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()
@ -148,6 +153,8 @@ class PhangoField:
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."""

View file

@ -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