Added more docstrings to forms and fields
This commit is contained in:
parent
26dd863af8
commit
d04a7121df
20 changed files with 79 additions and 9 deletions
|
|
@ -7,8 +7,16 @@ from paramecio2.libraries.db.coreforms import SelectModelForm
|
|||
from flask import request
|
||||
|
||||
class ParentField(IntegerField):
|
||||
"""Field used for create fields used by save a parent id from a row in db."""
|
||||
|
||||
def __init__(self, name, size=11, required=False, field_name='name'):
|
||||
"""
|
||||
Args:
|
||||
name (str): The name of field
|
||||
size (int): The size of the new field in database. By default 11.
|
||||
required (bool): Boolean for define if field is required or not
|
||||
field_name (str): The name of the field used for identify the father row of the db.
|
||||
"""
|
||||
|
||||
super().__init__(name, size, required)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue