Added Long text field for webmodel
This commit is contained in:
parent
faf4c14e2b
commit
edf9b1bd30
3 changed files with 19 additions and 1 deletions
|
|
@ -24,11 +24,15 @@ def start_app():
|
|||
application_root='/'
|
||||
|
||||
if hasattr(config, 'application_root'):
|
||||
#print(config.application_root)
|
||||
application_root=config.application_root
|
||||
|
||||
|
||||
app.config.update(
|
||||
APPLICATION_ROOT=application_root
|
||||
)
|
||||
|
||||
#app.config['APPLICATION_ROOT']=application_root
|
||||
|
||||
if hasattr(config, 'json_sort_keys'):
|
||||
app.config.update(
|
||||
|
|
|
|||
|
|
@ -172,6 +172,20 @@ class TextField(PhangoField):
|
|||
|
||||
return 'TEXT '+self.set_default
|
||||
|
||||
class LongTextField(TextField):
|
||||
"""Class used for long text fields (32 bits size, 4G)
|
||||
|
||||
Class used for text fields, use LONGTEXT sql type for the this field.
|
||||
"""
|
||||
|
||||
def get_type_sql(self):
|
||||
|
||||
"""Method for return the sql code for this type
|
||||
|
||||
"""
|
||||
|
||||
return 'LONGTEXT '+self.set_default
|
||||
|
||||
class HTMLField(TextField):
|
||||
"""Class used for html fields
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue