[web2py] Datatables Object ID

2019-04-12 Thread Cristina Sig
Hello everybody, I have two tables and I am working with Datatables and what I would like to do is use the child row to show more information about a particular row. For example, on the table I will display first name, last name, username, and email and on the child or expandable row, I will sh

[web2py] Re: Datatables Object ID

2019-04-13 Thread Cristina Sig
.Person.id>0).select() > ids = [row.nationality for row in rows] # find the nationalities > mapping = db(db.Nationality.id.belongs(ids)).select().as_dict() # > build a mapping in one extra query > for row in rows: row.nationality=mapping[row.nationality].description > # applly

[web2py] Datatables add buttons on each row and pass args to controller function

2019-04-15 Thread Cristina Sig
Hello everybody, I'm trying to add an "Edit" and "Delete" buttons on each row on a Datatable. When I click on "edit", it calls a controller function and needs to pass the id of that row as argument. I'm having issues doing it right. Any suggestions? Thank you! My controller def usuarioUpd

[web2py] Add recoCrud form into modal

2019-04-29 Thread Cristina Sig
Hello everyone, I have a button to add records. What I am trying to do is when I click on it I want to display a modal that contains a Crud form to create/add a new record. Something like this Example Any suggestions to do that?

[web2py] Web2py: Update table content after submit action

2019-05-25 Thread Cristina Sig
I have a table filled with records from a database. Also, I have a button to add a new record. Once I enter all the data for the new record and press the submit button, I want to update the content of the table without reloading the page (without F5). I'm struggling to find a solution to th

[web2py] Datatables serverside JSON/Ajax

2019-06-10 Thread Cristina Sig
Hello everybody, I have been struggling with this for days and I'd like some help. I'm working with DataTables plugin and I'm trying to load data related to University's careers from a database and populate the table through Ajax. The issue is that I don't much about Ajax and JSON and I got th

[web2py] Re: Datatables serverside JSON/Ajax

2019-06-13 Thread Cristina Sig
Thank you @Leonel, I tried your suggestion and it works but the JSON response replaces the HTML so, I can't see my Datatable only the plain array information from JSON response. I don't understand if I call the controller wrong or what is happening? El martes, 11 de junio de 2019, 5:52:42 (UTC-

[web2py] Re: Datatables serverside JSON/Ajax

2019-06-13 Thread Cristina Sig
Thank you @John yes, I have been checking DT docs and it seems that I need to add that data, I tried it but the sorting and ordering is not working at all. Do you have any idea or example how to deal with that? El martes, 11 de junio de 2019, 9:43:14 (UTC-3), John Bannister escribió: > > @Leone

[web2py] Re: Datatables serverside JSON/Ajax

2019-06-14 Thread Cristina Sig
n but will get back to this in a few hours. > > -Jim > > > On Thursday, June 13, 2019 at 6:19:18 PM UTC-5, Cristina Sig wrote: >> >> Thank you @John >> yes, I have been checking DT docs and it seems that I need to add that >> data, I tried it but the sorting a

Re: [web2py] Re: Datatables serverside JSON/Ajax

2019-06-14 Thread Cristina Sig
Let me know if you have any problems or questions. > > -Jim > > web2py.app.school.w2p > <https://drive.google.com/file/d/14SQthm4NUpvmWtxEoFyQBHR_hEphlB-J/view?usp=drive_web> > > > On Fri, Jun 14, 2019 at 9:43 AM Cristina Sig > wrote: > >> Thank you

Re: [web2py] Re: Datatables serverside JSON/Ajax

2019-06-14 Thread Cristina Sig
search > filter should work. I didn't add the 'click on the column heading to > sort', but you can do all of that as well. > > Let me know if you have any problems or questions. > > -Jim > > web2py.app.school.w2p > <https://drive.google.com/file/

[web2py] web2py dynamic queries

2019-06-16 Thread Cristina Sig
Hello, I'm a newbie on python language so I'm struggling to do some queries. I have a table Student which I use to fill a table on view, above that table, I have a search box, where I would like to provide the option to search in multiple columns (phone, last name, first name, or nationality). I

[web2py] Re: web2py dynamic queries

2019-06-17 Thread Cristina Sig
ty.on(db.Student.nationality == db. > Nationality.id)) > > The above should give you the rows where the search text matches firstname > or lastname or phone or nationality description. You may want to change > that to 'and' instead of 'or' depending on your re

[web2py] Re: web2py dynamic queries

2019-06-17 Thread Cristina Sig
What you want to look at is the > error that web2py is generating to confirm that it is the phone number like > I think it is. > > -Jim > > On Monday, June 17, 2019 at 3:44:27 PM UTC-5, Cristina Sig wrote: >> >> Hello Jim, >> >> I tried the code and it sh

[web2py] Re: web2py dynamic queries

2019-06-17 Thread Cristina Sig
enced field (Nationality) or is it > just not returning the results you're expecting? > > -Jim > > On Monday, June 17, 2019 at 4:46:14 PM UTC-5, Cristina Sig wrote: >> >> thanks! >> I solved the integer field but it seems that the referenced fields are >> n

[web2py] Ajax Pass ID to Controller Function

2019-09-21 Thread Cristina Sig
Hello everybody, I'm struggling with this right here. I want to pass an id from view to a controller function so I can delete a record from database. So far this is what I got. I would appreciate some light on this because I don't know what I'm doing wrong. Thanks! view $('#warning').on('click

[web2py] Re: Open form's view on a modal

2019-10-18 Thread Cristina Sig
Thanks for your explanation, I'm a newbie on web2py so I have some doubts. Do you set your modal and script that calls that modal on the main page? or do you call it from a different view page? I'm a little bit confused El miércoles, 16 de octubre de 2019, 18:39:41 (UTC-3), Cr

[web2py] Redirect to different pages depending on memebership

2019-10-30 Thread Cristina Sig
Hi everyone, I have two different memberships. One is 'Admin' and the other one is 'Schools' and what I want to do is redirect to different index pages depending if I'm login as Admin or as School. This is my try: Default.py def check_membership(): if auth.has_membership(group_id='administr

[web2py] Re: Redirect to different pages depending on memebership

2019-10-30 Thread Cristina Sig
(): > ...your code... > > > > четверг, 31 октября 2019 г., 5:51:34 UTC+5 пользователь Cristina Sig > написал: >> >> Hi everyone, >> >> I have two different memberships. One is 'Admin' and the other one is >> 'Schools' and what I

[web2py] Re: Redirect to different pages depending on memebership

2019-10-31 Thread Cristina Sig
;default', 'indexAdmin')) > else: > redirect(URL('default', 'indexSchool')) > > @auth.requires_membership(role="administrador") > def indexAdmin(): > ...your_code... > > @auth.requires_login() > def indexSchool(): &g

[web2py] Password Field validate entropy

2019-11-19 Thread Cristina Sig
Hi everyone, I'm just having some issues on my login page. I'm trying to validate the password field but I don't know what I'm doing wrong because I can't get the validate_entropy to display when the user enters the password. How can I activate that option?