• 4679 views
  • 0 comments
  • loading...

web2py.plugin.sortable.image.w2p

Example of usage:
assume a model like
db.define_table('test',Field('name'),Field('sortable','integer'))
In a view you insert the sortable list as:
{{=plugin_sortable([(r.id,r.name) for r in db(db.test.id>0).select(orderby=db.test.sortable)],callback=URL(r=request,f='sort'))}}
And create a callback controller:
def sort():
    plugin_sortable_sort(db.test,sortable_field='sortable')

 plugin_sortable_sort(db.test,sortable_field='sortable')

Plugin File Download

loading...


Comments

loading...

Powered by
Web2py

Hosted on
www.pythonanywhere.com
(affiliated link)