[web2py] Re: Help with custom widget for list:reference field

2015-12-02 Thread Anthony
It would be helpful if you could distill the problem down to a smaller bit of code so we don't have to digest your entire plugin (i.e., just provide a simple table definition and basic controller code that generates the error). Anyway, I don't see where you are calling the get_media_field

[web2py] Re: Create Class that extends a model of the dal

2015-12-02 Thread Alessio Varalta
Thanks, Is the work for my project :) I see now in the guide the part of DatabaseLayer- Virtual Field On Wednesday, 2 December 2015 17:13:48 UTC+1, Anthony wrote: > > Not sure if this is what you're looking for, but check out >

[web2py] Role of users

2015-12-02 Thread Fabiano Almeida
Hi! I'm trying to create a list of roles for each user: for x in db(db.auth_user.id>0).select(db.auth_user.id): groups = [] for g in db(db.auth_membership.id > 0).select(db.auth_group.role, join=[db.auth_group.on(db.auth_group.id==db.auth_membership.group_id),

[web2py] Re: Create Class that extends a model of the dal

2015-12-02 Thread Anthony
Not sure if this is what you're looking for, but check out https://groups.google.com/forum/#!msg/web2py/ceqq4JwkWi4/csn0kZfyPuwJ (not documented in the book). Anthony On Wednesday, December 2, 2015 at 10:59:39 AM UTC-5, Alessio Varalta wrote: > > Hi, I want to assign specific function to a

[web2py] Create Class that extends a model of the dal

2015-12-02 Thread Alessio Varalta
Hi, I want to assign specific function to a Model of the Dal for example I have the table layer_scheda and I want to add the method change_pos..For example in Java o Ruby we have a package with the model class where you can put the function inside the class in these case with Web2py? --

[web2py] Re: Create Class that extends a model of the dal

2015-12-02 Thread Alessio Varalta
For example there is the possibility to define the class model like Java/Ruby I see this document http://weppy.org/docs/0.1/dal -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: How to use fancytree?

2015-12-02 Thread Henk huisman
> > It does work! Mille Grazie! >>> >> Thanks DenesL and Anthony. -- 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

[web2py] Re: Scheduler erroring when threading and trying to do database update.

2015-12-02 Thread Benson Myrtil
Was able to get this working. When I created the task, I originally had the application named something else. After renaming the application I forgot to update the application_name on the scheduler_task table. Once I did that it started working. On Monday, November 23, 2015 at 4:33:34 PM

[web2py] Re: Role of users

2015-12-02 Thread Fabiano Almeida
Hi Anthony! The auth.user_groups.value() is only for logged user or I can define user id to get for all users? Thanks! Fabiano Em quarta-feira, 2 de dezembro de 2015 14:47:50 UTC-2, Anthony escreveu: > > The roles for a user are stored as a dictionary in auth.user_groups, with > the keys

[web2py] Re: Role of users

2015-12-02 Thread Anthony
Sorry, yes, that's just for the logged in user. Maybe have a look at this code: https://github.com/web2py/web2py/blob/master/gluon/tools.py#L3779 Anthony On Wednesday, December 2, 2015 at 11:52:26 AM UTC-5, Fabiano Almeida wrote: > > Hi Anthony! > > The auth.user_groups.value() is only for

[web2py] Re: Role of users

2015-12-02 Thread Anthony
The roles for a user are stored as a dictionary in auth.user_groups, with the keys being the group IDs and the values being the roles, so for just a list of the roles: auth.user_groups.values() Anthony On Wednesday, December 2, 2015 at 11:31:14 AM UTC-5, Fabiano Almeida wrote: > > Hi! > > I'm

[web2py] Re: Role of users

2015-12-02 Thread Fabiano Almeida
It works using the example many to many of the book: for x in db(db.auth_user.id>0).select(db.auth_user.id): groups = [] users_and_groups = db((db.auth_user.id==x.id)& (db.auth_user.id==db.auth_membership.user_id) & (db.auth_group.id==db.auth_membership.group_id)) for g in

[web2py] Changing Bootstrap Navbar to light background colour

2015-12-02 Thread Chris Guest
I recently needed to modify the stock Bootstrap CSS so that the Navbar had a light colour, #fafafb . I added the following to static/css/web2py-bootstrap3.css . I just thought that I would share it here in case is useful for others. .navbar-default{ background-color:#fafafb;

[web2py] Re: Changing Bootstrap Navbar to light background colour

2015-12-02 Thread Leonel Câmara
Did you remove the navbar-inverse class? That's what makes it black. -- 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

[web2py] Re: Changing Bootstrap Navbar to light background colour

2015-12-02 Thread Chris Guest
I didn't remove any classes from static/css/bootstrap.min.css or static/css/bootstrap-theme.min.css . I only added code to static/css/web2py-bootstrap3.css . If there's a simpler way to do this, please let me know. On Thursday, December 3, 2015 at 11:33:11 AM UTC+11, Leonel Câmara wrote: > >

[web2py] Fancytree lazyload

2015-12-02 Thread Henk huisman
I am trying to use the javascript library Fancytree to generate a tree of an organization hierarchy. I manage to load the data in the tree to the first level of the organization with a JSON result dictionary. So I have a tree already. The rest of the children nodes I only want to load if

[web2py] FEATURE REQUEST: Case Insensitive Field types

2015-12-02 Thread Encompass solutions
I am not sure this exists yet, but it would be nice to take a string field (or anything string like) and make it case insensitive. That way I don't have to worry the j...@example.com is the same as j...@example.com What do you guys think? -- Resources: - http://web2py.com -

[web2py] Re: FEATURE REQUEST: Case Insensitive Field types

2015-12-02 Thread Niphlod
There's no such thing in several backends. That being said, I don't see the issue using requires=IS_UPPER() or requires=IS_LOWER() On Wednesday, December 2, 2015 at 8:59:49 AM UTC+1, Encompass solutions wrote: > > I am not sure this exists yet, but it would be nice to take a string field > (or

[web2py] Re: How to use fancytree?

2015-12-02 Thread 'DenesL' via web2py-users
Hi, assuming that the paths to the js & css files are correct you are missing the closing of $(function(){ in your script. Just duplicate the last line at the very end, i.e. add }); Denes On Tuesday, December 1, 2015 at 12:03:01 AM UTC-5, Henk huisman wrote: > > Fancytree looks to me as a nice

[web2py] Utilizzo di un template CSS adattato

2015-12-02 Thread Alessandro Leonetti
Buongiorno, ho trovato questa guida per adattare i template CSS del sito web proposto a web2py, però non sono riuscito a far funzionare il tutto, credo di aver sbagliato a sostituire le righe di codice del passo 5 nel file layout.html. Potreste aiutarmi? Il link della guida è questo

[web2py] How to add à link with arguments in SQLFORM.grid

2015-12-02 Thread Adrien
Hi everyone, I'm working on web2py for the first time and i have to make a grid with multiple tables. That works but i want to have a link with the id of one table and i don't know how to send this id. I made the following code : fields = (db.generalfix.IdGeneralFix, db.gene.NameGene,

[web2py] Impostare un gruppo d'appartenenza di DEFAULT per la registrazione

2015-12-02 Thread Alessandro Leonetti
Buongiorno Massimo, intanto comincio col ringraziarti per aver costruito Web2Py, mi stai dando una grossa mano per completare il mio stage universitario che prevede lo sviluppo di una piattaforma web. Dunque ho un paio di domande da farti: 1) La prima è come faccio ad assegnare ad i nuovi

[web2py] Select Input is not preselected with existing value when updating a record.

2015-12-02 Thread Abhishek Ram
I am updating a record with a List field, but I see that the select widget correspoding to this field is not populated with the existing value in the record. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: How to use fancytree?

2015-12-02 Thread Anthony
Always check the browser Javascript console to see if there are JS errors. On Wednesday, December 2, 2015 at 6:52:36 AM UTC-5, DenesL wrote: > > > Hi, assuming that the paths to the js & css files are correct you are > missing the closing of $(function(){ in your script. > Just duplicate the

[web2py] Re: FEATURE REQUEST: Case Insensitive Field types

2015-12-02 Thread Anthony
And if you're specifically interested in a case-insensitive email field in auth_user, you can do: auth.email_case_sensitive = False Anthony On Wednesday, December 2, 2015 at 3:05:12 AM UTC-5, Niphlod wrote: > > There's no such thing in several backends. > That being said, I don't see the issue

[web2py] Re: How to add à link with arguments in SQLFORM.grid

2015-12-02 Thread Anthony
On Wednesday, December 2, 2015 at 6:55:22 AM UTC-5, Adrien wrote: > > links = [dict(header='', body=lambda row : A(db.generalfix.IdGene, > _class='btn', _href=URL(c='show', f='show', vars = > dict(id=db.generalfix.IdGene] > Note, your lambda has a "row" argument, so that is what you use to

[web2py] Re: Select Input is not preselected with existing value when updating a record.

2015-12-02 Thread Anthony
Please show your code. On Wednesday, December 2, 2015 at 6:55:22 AM UTC-5, Abhishek Ram wrote: > > I am updating a record with a List field, but I see that the select widget > correspoding to this field is not populated with the existing value in the > record. > > -- Resources: -

[web2py] Re: How to add à link with arguments in SQLFORM.grid

2015-12-02 Thread Adrien
Okay, it works ! I understand now, thx Anthony ! Le mercredi 2 décembre 2015 14:46:26 UTC+1, Anthony a écrit : > > On Wednesday, December 2, 2015 at 6:55:22 AM UTC-5, Adrien wrote: >> >> links = [dict(header='', body=lambda row : A(db.generalfix.IdGene, >> _class='btn', _href=URL(c='show',

[web2py] Help with custom widget for list:reference field

2015-12-02 Thread Carlos Cesar Caballero Díaz
Hi, I am working in a plugin (based in the Tim Richardson ckeditor4 plugin galley) for creating a global media galley for web2py applications (some functionality like the wordpress and other cms galleys), it is in https://github.com/daxslab/web2py-media-galley. If you look at the functions