On Dec 12, 9:02 pm, mdipierro <[email protected]> wrote:
> you must do the insert manually after accept.
Is this not what I'm already doing here?
if form.accepts(request.vars,session,keepvalues=True):
layer.update(
name=form.vars.name,
description=form.vars.description,
type=form.vars.type,
priority=form.vars.priority,
enabled=form.vars.enabled
)
type_new=db(db.gis_layer_type.id==form.vars.type).select()[0].name
if type_new=="openstreetmap":
db(db['gis_layer_%s' % type_new].layer==t2.id).update(
type=form.vars.subtype
)
elif type_new=="google":
db(db['gis_layer_%s' % type_new].layer==t2.id).update(
type=form.vars.subtype
)
db(db.gis_key.service==type_new).update(
key=form.vars.key
)
response.confirmation=T("Layer updated")
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---