Re: [web2py] DAL and Json query

2015-05-11 Thread Manuele Pesenti
Il 11/05/15 04:44, IVINH ha scritto: Hi all, How DAL is supported json query? My test is on Web2py by source code v.2.10.3, PostgreSQL 9.4: db.define_table('person', Field('name','string'), Field('jdata','json')) db.person.insert(name='Adam',jdata='{age:30}') print

Re: [web2py] SQLFORM.grid multiple left joins and where clause

2015-05-11 Thread Johann Spies
On 10 May 2015 at 04:26, A36_Marty ma...@mccaslandcorp.com wrote: fields = db.auth_user.first_name, db.auth_group.role Make that fields = [db.auth_user.first_name, db.auth_group.role] fields should be a list. query = (db.auth_user)(db.auth_group.id == PARENT_GROUP_ID) #get query not

Re: [web2py] DAL and Json query

2015-05-11 Thread IVINH
Thank Manuele. How i can use jsonb type? On Monday, May 11, 2015 at 3:33:03 PM UTC+7, Manuele wrote: Il 11/05/15 04:44, IVINH ha scritto: Hi all, How DAL is supported json query? My test is on Web2py by source code v.2.10.3, PostgreSQL 9.4: db.define_table('person',

[web2py] Re: DAL and Json query

2015-05-11 Thread IVINH
This my fault, it need instead age by 'age'. print db.executesql(SELECT * FROM person WHERE (jdata - 'age') '49';) On Monday, May 11, 2015 at 9:44:11 AM UTC+7, IVINH wrote: Hi all, How DAL is supported json query? My test is on Web2py by source code v.2.10.3, PostgreSQL 9.4:

Re: [web2py] IS_IN_DB() multiple tables

2015-05-11 Thread kecajkecaj123
Richard, Let say that I have two IPs in ipaddress table: 10.1.1.1 FREE 10.2.2.2 FREE I add a server into server table, i put name as server1 and chose IP from dropdown menu 10.1.1.1. Then my ipaddress table looks like that 10.1.1.1 USED 10.2.2.2 FREE But i noticed that i did a typo in

Re: [web2py] Re: web2pyslices down

2015-05-11 Thread Massimiliano
+1 On Mon, May 11, 2015 at 11:36 AM, Michele Comitini michele.comit...@gmail.com wrote: why not using slices.web2py.com? same 2nd level domain as web2py and less problems for maintenance... 2015-05-10 22:23 GMT+02:00 Alan Etkin spame...@gmail.com: Web2pysplices.com is on sale Cool!

Re: [web2py] Re: web2pyslices down

2015-05-11 Thread Michele Comitini
why not using slices.web2py.com? same 2nd level domain as web2py and less problems for maintenance... 2015-05-10 22:23 GMT+02:00 Alan Etkin spame...@gmail.com: Web2pysplices.com is on sale Cool! And what about web2pyslices.com, is it on sale also? -- Resources: - http://web2py.com -

Re: [web2py] DAL and Json query

2015-05-11 Thread Manuele Pesenti
Il 11/05/15 10:48, IVINH ha scritto: Thank Manuele. How i can use jsonb type? I don't know... but I don't think jsonb is supported at the moment. Anyway I also think (but test is needed) you can use a json field in your model to represent a column that is of jsonb type. It requires to create

Re: [web2py] IS_IN_DB() multiple tables

2015-05-11 Thread 黄祥
why not use conditional requires base on url? e.g. if 'free' in request.controllers: On Monday, May 11, 2015 at 4:19:03 PM UTC+7, kecajk...@gmail.com wrote: Richard, Let say that I have two IPs in ipaddress table: 10.1.1.1 FREE 10.2.2.2 FREE I add a server into server table, i put

[web2py] Get Ticket issued: unknown instead of the reference link to the error ticket when crashing

2015-05-11 Thread François Delpierre
Hi, On a Debian 7, with web2py 2.9.12-stable+timestamp.2015.02.13.23.31.09 (Running on Apache, Python 2.7.3) - WSGI with https I have a problem I can't figure out. On a healthy instance of Web2PY, when an error occurs, we have an Internal Error message, and a Ticket Issued with a link

[web2py] Off topic W2UI

2015-05-11 Thread António Ramos
Seems nice and easy http://w2ui.com/web/demos/ -- 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

Re: [web2py] IS_IN_DB() multiple tables

2015-05-11 Thread Richard Vézina
Ok, so the problem is that when you edit your record the dropbox field shouldn't be blank... That is your issue, would you share the code of you form and grid and the exact validators... There shoud be something that don't work somewhere... And it you may start here :

Re: [web2py] SQLFORM.grid multiple left joins and where clause

2015-05-11 Thread A36_Marty
Thanks for your response. I changed the fields to a list and that works fine. Ditto for the field.represent feature. Thanks! I am still having problems getting the WHERE clause correctly inserted in the query. (The 2-3 different query assignments I originally posted were variations I had

[web2py] Re: Why web2pyslices.com is down? What we can do?

2015-05-11 Thread Carlos A. Armenta Castro
ATENTION: You can acces web2pyslices from the URL: http://web2pyslices.pythonanywhere.com/ I hope in a future we can have a special domain to allocate all the web2py recipes. El sábado, 9 de mayo de 2015, 2:54:51 (UTC-7), Carlos A. Armenta Castro escribió: Im trying to acces

Re: [web2py] Re: auth_permission for group of records based on column value?

2015-05-11 Thread Richard Vézina
You need to enforce it at controller level... What I usually do it to filter the record user can view base on their role... The drawback depends of your exact requirement is that they only see in grid what they are allowed to modify or access... But nothing prevent you to display all record and

Re: [web2py] Re: how does search work on sql grid? (search over a whole table instead of a field)

2015-05-11 Thread Anthony
The built-in search works similarly, though it includes additional logic to handle advanced search syntax, which it passes of to the smart_query function in the DAL. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: Off topic W2UI

2015-05-11 Thread Ron Chatterjee
Ron the designer speaking. This is really nice! Who ever did this, please accept my thanks:-) On Monday, May 11, 2015 at 9:18:12 AM UTC-4, Ramos wrote: Seems nice and easy http://w2ui.com/web/demos/ -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Something went wrong when I copied the web2py folder

2015-05-11 Thread Richard Vézina
File with a bad name which your file system don't support? Richard On Sat, May 9, 2015 at 10:48 PM, Joe degroupme...@gmail.com wrote: I offten create back ups for my web2py folder, copying the entire folder from mu computer to an external hard disc. During the last back up something

[web2py] Re: Bootstrap datepicker plugin

2015-05-11 Thread Leonel Câmara
Here's the latest version with this fixed -- 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

[web2py] Re: Store DB Data in Array

2015-05-11 Thread Ron Chatterjee
you can also see documentation about cpickle. On Monday, May 11, 2015 at 2:46:44 PM UTC-4, Dave S wrote: On Saturday, May 9, 2015 at 2:54:15 AM UTC-7, fuuby wrote: Hello Everyone :) I just startet using Web2py and currently I am working on a little project. Therefor I want to store

Re: [web2py] Re: Store DB Data in Array

2015-05-11 Thread Richard Vézina
Fuuby, what your goal? We may be able to help better... Richard On Mon, May 11, 2015 at 3:11 PM, Dave S snidely@gmail.com wrote: On Monday, May 11, 2015 at 11:46:44 AM UTC-7, Dave S wrote: On Saturday, May 9, 2015 at 2:54:15 AM UTC-7, fuuby wrote: Hello Everyone :) I just

[web2py] Re: Store DB Data in Array

2015-05-11 Thread Dave S
On Monday, May 11, 2015 at 11:46:44 AM UTC-7, Dave S wrote: On Saturday, May 9, 2015 at 2:54:15 AM UTC-7, fuuby wrote: Hello Everyone :) I just startet using Web2py and currently I am working on a little project. Therefor I want to store data I selected with a

[web2py] Re: Store DB Data in Array

2015-05-11 Thread Dave S
On Saturday, May 9, 2015 at 2:54:15 AM UTC-7, fuuby wrote: Hello Everyone :) I just startet using Web2py and currently I am working on a little project. Therefor I want to store data I selected with a SQLTABLE(db().select(something)) from my database into a array (each result into a

Re: [web2py] Two SQLFORMs side by side?

2015-05-11 Thread LoveWeb2py
Thanks haha. Just checking. Still not having much luck. I'm getting a 500 error on the add function and can't figure out why when I try to edit my site I am getting an error for the add function specified to add the https://www.mywebsite.com/add_function/second_table_field def

Re: [web2py] Re: Creating a grid based on queries pertaining to a primary db table, and a table that references it

2015-05-11 Thread Spokes
Yep, that seems to work. Thank you, Massimiliano! On Sunday, May 10, 2015 at 5:15:53 AM UTC-5, Massimiliano wrote: Another way: tc = t.with_alias('chairs') q = (tc.name == 'chair') q = q (t.name == 'table') q = q (t.owner_id == tc.owner_id) q = q (p.id == tc.owner_id) print

[web2py] Re: Store Selected DB Data in Array

2015-05-11 Thread Dave S
On Saturday, May 9, 2015 at 6:00:45 AM UTC-7, 黄祥 wrote: perhaps you can use session for store the db data query ref: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#as_dict-and-as_list best regards, stifan Ooops .. 2 threads with the same question. I

Re: [web2py] Two SQLFORMs side by side?

2015-05-11 Thread Richard Vézina
The commented lines in the class was there because I recently refactor it to make it use boostrap modal instead of jquery ui dialog as you may understand carefully reading the code!! :-P Richard On Mon, May 11, 2015 at 2:40 PM, LoveWeb2py atayloru...@gmail.com wrote: Are the commented lines

Re: [web2py] Two SQLFORMs side by side?

2015-05-11 Thread Richard Vézina
I will try to review it ASAP... On Mon, May 11, 2015 at 4:30 PM, LoveWeb2py atayloru...@gmail.com wrote: Here is my dummy app, Richard. On Monday, May 11, 2015 at 3:50:20 PM UTC-4, Richard wrote: Did you make dummy app for testing it? Please attach it here and I have a look to your

[web2py] Re: SQLFORM.grid multiple left joins and where clause

2015-05-11 Thread A36_Marty
I figured out my problem. By changing the query to: query = db.auth_user.id0 query = querydb.auth_group.id==SOME_VALUE I was able to get the WHERE clause into the grid AND still be able to access fields in both tables.Previously I was only specifying query=db.auth_group.id == VALUE, which

Re: [web2py] Two SQLFORMs side by side?

2015-05-11 Thread LoveWeb2py
No rush, Richard. Thank you for your help I really appreciate it. On Monday, May 11, 2015 at 4:34:14 PM UTC-4, Richard wrote: I will try to review it ASAP... On Mon, May 11, 2015 at 4:30 PM, LoveWeb2py atayl...@gmail.com javascript: wrote: Here is my dummy app, Richard. On Monday, May

Re: [web2py] Two SQLFORMs side by side?

2015-05-11 Thread Richard Vézina
Did you make dummy app for testing it? Please attach it here and I have a look to your code... I can't help much if I don't have a good idea of what you have done... new_exp_num=form.vars.exp_num This is something I left which should be adapted to your app... form.vars.exp_num is the

[web2py] Re: Bootstrap datepicker plugin

2015-05-11 Thread villas
Thanks Leonel. BTW in your first post you said: Field('birthdate', 'date', widget=bsdatepicker_widget) It should be with brackets at the end: Field('birthdate', 'date', widget=bsdatepicker_widget()) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] What's the proper way of using scheduler for multiple apps with one only db?

2015-05-11 Thread Lisandro
I have *one master app* that handles the *main db, in which the scheduler tables have been created*. This master app has a scheduler.py module that looks like this (for now, with no function tasks defined): # -*- coding: utf-8 -*- from gluon.scheduler import Scheduler scheduler = Scheduler(db,

Re: [web2py] Two SQLFORMs side by side?

2015-05-11 Thread LoveWeb2py
Are the commented lines necessary or was that for self reference? # js += '$(#%s_option_add_trigger). click(function() {' \ # '$(#%s_dialog-form).dialog(open);' \ # 'return false;' \ # '}); ' % (my_select_id, my_select_id) On Thursday, May

[web2py] Re: What's the proper way of using scheduler for multiple apps with one only db?

2015-05-11 Thread Lisandro
I've figured it out: when using a central db for the scheduler, there is no need (at least in this case) of calling web2py.py -K with all the apps, just with the main app, in my case: python /home/user/web2py/web2py.py -K masterapp Sorry I bothered you. Maybe someday someone is having the same

[web2py] Re: Why web2pyslices.com is down? What we can do?

2015-05-11 Thread Derek
You just can't login with google... On Monday, May 11, 2015 at 8:24:21 AM UTC-7, Carlos A. Armenta Castro wrote: ATENTION: You can acces web2pyslices from the URL: http://web2pyslices.pythonanywhere.com/ I hope in a future we can have a special domain to allocate all the web2py

[web2py] Re: web2pyslicesgate

2015-05-11 Thread Derek
Looks okay, needs to be pruned though as I see mirek posted a bunch of nonsense there. On Sunday, May 10, 2015 at 6:33:33 AM UTC-7, Alan Etkin wrote: I forgot I was the web2pyslices app admin :P BTW: there seem to be some issue about the web2pyslices.com domain, since the one that is

[web2py] Re: web2pyslicesgate

2015-05-11 Thread Derek
zvolsky also. On Monday, May 11, 2015 at 10:43:25 AM UTC-7, Derek wrote: Looks okay, needs to be pruned though as I see mirek posted a bunch of nonsense there. On Sunday, May 10, 2015 at 6:33:33 AM UTC-7, Alan Etkin wrote: I forgot I was the web2pyslices app admin :P BTW: there seem to