save point
This commit is contained in:
parent
17f2dfe1d1
commit
ce08699104
5 changed files with 47 additions and 30 deletions
|
@ -114,21 +114,17 @@ def crud(request, cls, fieldset_factory, home=None, delete=None, post_sync=None,
|
|||
if res:
|
||||
return res
|
||||
|
||||
if request.params.get('partial'):
|
||||
# Session.flush()
|
||||
# return self.json_success(uuid=fs.model.uuid)
|
||||
assert False, "need to fix this"
|
||||
if request.params.get('partial'):
|
||||
# Session.flush()
|
||||
# return self.json_success(uuid=fs.model.uuid)
|
||||
assert False, "need to fix this"
|
||||
|
||||
# Session.commit()
|
||||
if not home:
|
||||
# FIXME
|
||||
# home = request.route_url.current() + '?uuid=' + fs.model.uuid
|
||||
# home = request.route_url('home')
|
||||
fs.model = Session.merge(fs.model)
|
||||
home = request.current_route_url() + '?uuid=' + fs.model.uuid
|
||||
request.session.flash("%s \"%s\" has been %s." % (
|
||||
fs.crud_title, fs.get_display_text(),
|
||||
'updated' if fs.edit else 'created'))
|
||||
if not home:
|
||||
fs.model = Session.merge(fs.model)
|
||||
home = request.current_route_url(uuid=fs.model.uuid)
|
||||
request.session.flash("%s \"%s\" has been %s." % (
|
||||
fs.crud_title, fs.get_display_text(),
|
||||
'updated' if fs.edit else 'created'))
|
||||
return HTTPFound(location=home)
|
||||
|
||||
data = {'fieldset': fs, 'crud': True}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue