Re: [web2py] Re: grid: deletion row callback

2014-07-08 Thread Manuele Pesenti
Il 08/07/14 07:54, Manuele Pesenti ha scritto: Il 07/07/14 23:49, Anthony ha scritto: I'm not sure how easy that would be in the browser without hacking web2py.js, but on the server, you can check for when a deletion happens and then send back some JS to be executed. Not tested, but maybe

[web2py] Re: XMLRPC fault ?

2014-07-08 Thread lyn2py
When I used @service.jsonrpc instead, It gave this error… File /Users/.../web2py/.../gluon/contrib/simplejsonrpc.py, line 108, in lambda return lambda *args: self.call(attr, *args) File /Users/.../web2py/.../gluon/contrib/simplejsonrpc.py, line 140, in call self.error.get('data',

[web2py] Re: XMLRPC fault ?

2014-07-08 Thread lyn2py
Update: The JSON-RPC works in command line, but not in my app1's controller function (all my testing is done localhost). I'm seeking assistance from anyone using JSON-RPC, with POST or GET to make it work… thank you!!! On Tuesday, July 8, 2014 4:17:55 PM UTC+8, lyn2py wrote: When I used

[web2py] JSON-RPC calls within controller functions

2014-07-08 Thread lyn2py
I'm wanting to get JSON RPC to work within web2py controller functions, without using pyjamas (which is the example provided in the book) This is my code for the JSON RPC call: def test_call(): from gluon.contrib.simplejsonrpc import ServerProxy service =

[web2py] Re: Login drop down in appadmin while logged in into admin

2014-07-08 Thread Annet
Thank you both for your reply. The difference between admin and appadmin, wasn't clear to me but now it is. Regards, Annet -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] unique=True for time on sqlite

2014-07-08 Thread Paolo Valleri
Hi all, I've tested the same example on both postgres and sqlite: def run(): db.define_table('user_table', Field('birthday', 'date', unique=True)) grid = SQLFORM.grid(db.user_table.id, user_signature=False) return {'grid':grid} The expected behavior is to get an error

[web2py] SQLFORM.grid changes request

2014-07-08 Thread Yebach
Hello When I try to put form = SQLFORM.grid(db.mytable) in my controller the request changes to my/web/site/view?_signature=520af19b1095db04dda2f1b6cbea3a03c3551e13 which causes my if statement in controller to collapse. Can smbd please explain why this happens? thank you -- Resources: -

[web2py] unique=True for time on sqlite

2014-07-08 Thread Anthony
Are you saying you want an error message to appear on the form? For that, you need an IS_NOT_IN_DB validator, regardless of the database backend. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] unique=True for time on sqlite

2014-07-08 Thread Paolo Valleri
What is odd to me is that,on postgres the validator works as expected while on sqlite it doesn‘t and it is the backend itself that raises the exception. On Jul 8, 2014 6:43 PM, Anthony abasta...@gmail.com wrote: Are you saying you want an error message to appear on the form? For that, you need

[web2py] DAL Bug?

2014-07-08 Thread Leonel Câmara
I noticed I was getting zero returned from my deletes. After reading the python docs I found this: With SQLite versions before 3.6.5, rowcount https://docs.python.org/2/library/sqlite3.html#sqlite3.Cursor.rowcount is set to 0 if you make a DELETE FROM table without any condition. Available

Re: [web2py] unique=True for time on sqlite

2014-07-08 Thread Paolo Valleri
I found the issue. Since the format of the date field (same happens for the time field) is a text in sqlite we must postpone to the validator IS_NOT_IN_DB the validator IS_DATE. By setting: db.user_table.birthday.requires=[IS_DATE(), IS_NOT_IN_DB(db, 'user_table.birthday')] everything works as

Re: [web2py] unique=True for time on sqlite

2014-07-08 Thread Anthony
In DAL.sqlhtml_validators, we have: if field.unique: requires.insert(0,validators.IS_NOT_IN_DB(db,field)) I wonder why IS_NOT_IN_DB is prepended rather appended to the list of validators. Given that some of the validators may actually alter the value to be inserted (e.g., CRYPT,

[web2py] Re: How to host a website from web2py homepage on pythonanywhere.com?

2014-07-08 Thread Dragan Matic
Check my answer on the same question here: https://groups.google.com/forum/?fromgroups#!searchin/web2py/dragan/web2py/IURWDAP2eTY/EBgPNBZ2kmwJ On Sunday, July 6, 2014 1:46:09 PM UTC+2, Ritesh Bhat wrote: Hi everyone, I am a beginner and am using the web2py framework.for the first time. I

[web2py] SQLEDITABLE : writable=False dosen't work

2014-07-08 Thread Fabiano Almeida
Hi!, I'm trying to use SQLEDITABLE plugin with readable and writable attributes. readable = False, hide the field. OK. writable = False, the field remains editable. How to leave only a few editable fields? Thanks, Fabiano. -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: DAL Bug?

2014-07-08 Thread Derek
What's buggy about it? On Tuesday, July 8, 2014 10:18:45 AM UTC-7, Leonel Câmara wrote: I noticed I was getting zero returned from my deletes. After reading the python docs I found this: With SQLite versions before 3.6.5, rowcount

[web2py] Re: SQLEDITABLE : writable=False dosen't work

2014-07-08 Thread Fabiano Almeida
Sorry, my fault I configured writable = False for wrong field o.O thanks, Fabiano. Em terça-feira, 8 de julho de 2014 18h16min06s UTC-3, Fabiano Almeida escreveu: Hi!, I'm trying to use SQLEDITABLE plugin with readable and writable attributes. readable = False, hide the field. OK.

[web2py] Re: custom group names in web2py

2014-07-08 Thread Derek
Not quite understanding. If the group isn't created yet, why would you want to add someone to it? What's the point of your groups? If you aren't using it for authorization, you're better of rolling your own groups. On Monday, July 7, 2014 2:50:17 AM UTC-7, Jimmy Stewpot wrote: Hello, I am

[web2py] Re: custom group names in web2py

2014-07-08 Thread 黄祥
i think it can be achieved, because web2py had the same function for that, unless you set settings.create_user_groups = False. please take a look at web2py code for that, and modified it to achieve what you want. best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] SQLEDITABLE: redirect after submit

2014-07-08 Thread Fabiano Almeida
Hi, Has like 'accepted' attribute in SQLEDITABLE? I need redirect to other page after 'ok' click. Thanks, Fabiano. -- 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

[web2py] Re: Using DAL inside a thread

2014-07-08 Thread dlypka
Perhaps the Scheduler can help. On Saturday, July 5, 2014 11:47:39 AM UTC-5, Wonton wrote: Hello! As I commented in other post ( https://groups.google.com/forum/#!topic/web2py/ZbEndj2H-fk) I have problems using APNSWrapper feedback service sending push notifications. While I wait for an

[web2py] Possible to add a field to bulk_insert?

2014-07-08 Thread LoveWeb2py
I have data in json format and I love the db.table.bulk_insert(jsondata) feature However, if I try to add a field it doesn't take it. For example: db.table.bulk_insert(jsondata, modified_by=db.auth_user['auth.user.id]['username']) Any thoughts on how I could accomplish this? -- Resources:

Re: [web2py] Auto update db records behaviour per input field on release (AJAX)

2014-07-08 Thread Francisco Gama
Derek, that bit where you mention hooking run-time validation to be saved, is pretty much what I’m doing in my post. You need to consider that you might not have a complete record to insert, but one field at the time, hence why I create the ‘updateTableService()’. From what I understand, the

Re: [web2py] Auto update db records behaviour per input field on release (AJAX)

2014-07-08 Thread Francisco Gama
Small errata on my own post: I’m also doing some client side input validation at the moment since web2py provides some of it for “free (e.g. if you have an input field that expects a number, you can’t even type any other character, it’s automatically removed) but of course that parsley would

[web2py] Before update and After update callbacks are giving the same results on updating table

2014-07-08 Thread Sarbjit
Hi All, I want to detect if there is a change in auth_user table for registeration_key field. I have implemented the following code :- Models : db.auth_user._before_update.append(lambda s,f: before_trigger_auth(s,f)) db.auth_user._after_update.append(lambda s,f: after_trigger_auth(s,f))