Little fixes in silly bugs
This commit is contained in:
parent
4c449fe2a7
commit
b80e18898f
3 changed files with 12 additions and 2 deletions
|
|
@ -87,6 +87,8 @@ class GenerateAdminClass:
|
|||
|
||||
post=GetPostFiles.post
|
||||
|
||||
self.model.reset_conditions()
|
||||
|
||||
insert_row=self.model.insert
|
||||
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -100,6 +100,10 @@ class ForeignKeyField(IntegerField):
|
|||
|
||||
self.foreignkey=True
|
||||
|
||||
def get_type_sql(self):
|
||||
|
||||
return 'INT NULL'
|
||||
|
||||
class BooleanField(IntegerField):
|
||||
|
||||
def __init__(self, name, size=1):
|
||||
|
|
|
|||
|
|
@ -3,12 +3,16 @@
|
|||
from paramecio.cromosoma import corefields
|
||||
from bottle import request
|
||||
|
||||
# Need unittest
|
||||
|
||||
def pass_values_to_form(post, arr_form, yes_error=True):
|
||||
|
||||
for key, value in arr_form.items():
|
||||
|
||||
post[key]=post.get(key, '')
|
||||
|
||||
arr_form[key].default_value=post[key]
|
||||
if arr_form[key].default_value=='':
|
||||
arr_form[key].default_value=post[key]
|
||||
|
||||
if arr_form[key].field==None:
|
||||
arr_form[key].field=corefields.CharField(key, 255, required=False)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue