Fix some basic product editing features
mostly for sake of online demo
This commit is contained in:
parent
815cdbdd0a
commit
86617e410f
3 changed files with 96 additions and 15 deletions
|
@ -51,6 +51,7 @@ from webhelpers2.html import tags, HTML
|
|||
from tailbone.util import raw_datetime
|
||||
from . import types
|
||||
from .widgets import ReadonlyWidget, PlainDateWidget, JQueryDateWidget, JQueryTimeWidget
|
||||
from tailbone.exceptions import TailboneJSONFieldError
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
@ -786,7 +787,10 @@ class Form(object):
|
|||
if field.cstruct is colander.null:
|
||||
return 'null'
|
||||
|
||||
return json.dumps(field.cstruct)
|
||||
try:
|
||||
return json.dumps(field.cstruct)
|
||||
except Exception as error:
|
||||
raise TailboneJSONFieldError(field.name, error)
|
||||
|
||||
def messages_json(self, messages):
|
||||
dump = json.dumps(messages)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue