Fixes for apidoc
This commit is contained in:
parent
a84a2b51ff
commit
7c5af27ecf
3 changed files with 13 additions and 2 deletions
|
|
@ -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."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue