My attempt at integrating datatables.net and web2py

68 views
Skip to first unread message

Andrew Rogers

unread,
Jul 1, 2020, 8:38:51 AM7/1/20
to web2py-users
Hi

I have taken more from this group than i have given. Many thanks to those who have tried to help me here and on Stackoverflow. A special shoutout to Anthony who's answers I keep finding all over stakoverflow.

So, here is my attempt to contribute something that someone might find useful. Some of the datatables features are quite cool. And web2py made the integration pretty easy. I really like the DAL. And i was able to get web2py's forms to popup in a modal and then submit them via ajax which makes editing nice.

I think I have replicated much of the functionality found in the web2py smartgrid. My grid is definitely less smart though.

A few screenshots below. And a quick overview video for those interested here https://youtu.be/yr1S1_5kCs8

I've only been using JS and python and web2py and boostrap and jquery since the lockdown started. So my code is rough. But if you think it could be helpful then let me know and i will document it a little and try and bundle it up so it can be added to an existing project.
Organisation_Edit.pngOrganisations.pnglots_of_grids.pngmaster_detail.pngchild_fields.png

Cheers
Andrew

António Ramos

unread,
Jul 1, 2020, 10:53:34 AM7/1/20
to web...@googlegroups.com
Nice! congrats...
Can you share your code ??
thank you 

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/3f742a3c-8261-4367-859b-9e67de541aeen%40googlegroups.com.

Kevin Keller

unread,
Jul 1, 2020, 11:28:57 AM7/1/20
to web2py-users
Andrew, I would also love to have a look at the code. 

Thank you!

Looks great

AGRogers

unread,
Jul 1, 2020, 11:51:29 PM7/1/20
to web...@googlegroups.com
OK, great. I will tidy and document and bundle something up and upload it somewhere. Hopefully be available early next week. 

Andrew Rogers

unread,
Jul 6, 2020, 10:48:20 AM7/6/20
to web2py-users
OK, i have tidied up the code a little and fixed more bugs. You can grab an app with all the code you should need from Github here:

I have done a couple more videos that might be helpful.  This one shows some examples of what it can do and describes the settings to do it:

And this video tried to describe how the code fits together. Probably writing some documentation would be better but I'm lazy when it comes to docs.

Just a disclaimer again, i have been coding web technologies for a few months. So the code can be improved a lot. If you have some suggestions I would love to hear them.

Cheers
Andrew


 

Reply all
Reply to author
Forward
0 new messages