[web2py] weird module function call behavior

2013-05-24 Thread gthwang5
I have the following class called a *a.py * class A: def B ( self, var ): return var in my *default.py* import a def index(): form = SQLFORM(db.parameters) datatable = if form.process().accepted: datatable = a.A().B(hello world) return

[web2py] Re: Postgres users beware auth.signature is_active; bad problem, easy to fix

2013-05-24 Thread Paolo valleri
I agree, it would be nice to have is_active as a real boolean although I don't know how difficult could be its implementation without breaking the backward compatibility. Furthermore, I've just checked my instance and is_active is saved as 'T' with postgres 9.1 Paolo On Friday, May 24, 2013

[web2py] REF: auth.login_bare() not working properly

2013-05-24 Thread Teddy Nyambe
I have a complete ajax application am building using DHTMLX client framework. I am using all the controls from there. I have a login form define in my app using DHTMLX as follows: *View:* * * script ... function loginForm() { loginFrmConf = [ {type: settings,

Re: [web2py] Re: dynamic dal query

2013-05-24 Thread António Ramos
thank you it works now. My mistake 2013/5/23 Anthony abasta...@gmail.com That should work if you are passing in the name of the table as a string. If you're passing in the table object itself, then it should be: row=db(table_to_query.id0).select() As an aside, it helps if you report

[web2py] Re: Postgres users beware auth.signature is_active; bad problem, easy to fix

2013-05-24 Thread Cliff Kachinske
I suspect this is probably unique to me. Can you point me to the code? I've looked in tools.py and dal.py but I can't find the exact spot where Python True becomes 'T'. All the inserts were done using grid or SQLFORM. Here is the output from psql: is_active | character(1)

[web2py] add image icon in lamda row value

2013-05-24 Thread Pawan Jha
Hi all I want to add icon in lambda row: A('Mark as prank',,_href=URL(Informercall,Markasprank,args=[row.call_log.id])) please suggest me what i need to use for this -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from

[web2py] Re: Memory leak, SQLite, Windows (7, 2008)

2013-05-24 Thread Simon Ashley
Thanks, its clearer now. (coming from a different environment, takes a while for aspects to sink it.) Have converted main tables off SQLite and reduced the updates down to a minute. Sorry about the db(query).update(**arguments) (didn't read it properly - wasn't actually my code ...)

[web2py] asynchronous respons using twisted... is it possible?

2013-05-24 Thread Manuele Pesenti
Hi! Starting from the fact that using the anyserver script web2py can be run under twistedmatrix web server... is it possible to combine web2py with twisted async way of programming? First practical problem: if I have a controller that represent a simple web service that perform a query and

[web2py] possible error with prettydate SQLFORM.grid

2013-05-24 Thread Lazarof
Hello! type 'exceptions.AttributeError' 'str' object has no attribute 'year' In db.py from gluon.tools import prettydate sometable = db.define_table('sometable', Field('someinteger', 'integer', default=-1), Field('updated', 'datetime') ) sometable.updated.represent = lambda

[web2py] DAL: Can I check if a value is in a list

2013-05-24 Thread Simon Carr
By the way I am using Gluon in a standalone Python script, so if the code does not look quite that might be the reason. I currently have some values hard coded in my SQL but I now want users to have a choice. Here is the current code. RS_Data = db(

[web2py] parse_as_rest limit

2013-05-24 Thread Wouter Pronk
Hello All, I'm trying out the pasrse_as_rest example from the book. One of the options is limit . I have 14 records in my table and I want to show the first 10 records. If I enter in http://localhost:8000/RT/default/api/entries?limit=10; the page returns too many records. I also tried using

Re: [web2py] DAL: Can I check if a value is in a list

2013-05-24 Thread Manuele Pesenti
Il 24/05/13 13:21, Simon Carr ha scritto: By the way I am using Gluon in a standalone Python script, so if the code does not look quite that might be the reason. I currently have some values hard coded in my SQL but I now want users to have a choice. Here is the current code. | RS_Data =

Re: [web2py] DAL: Can I check if a value is in a list

2013-05-24 Thread Simon Carr
Hi Manuele, I don't need to build the entire query, just the filters for the itemgroup column. Let me try and explain this a bit differently. I have a list of 10 items a user can select from. If the user selects 4 items, I need to have four 'OR' statements (itemgroup=='a' or itemgroup=='b' or

Re: [web2py] DAL: Can I check if a value is in a list

2013-05-24 Thread Manuele Pesenti
Il 24/05/13 13:38, Simon Carr ha scritto: Hi Manuele, I don't need to build the entire query, just the filters for the itemgroup column. Let me try and explain this a bit differently. I have a list of 10 items a user can select from. If the user selects 4 items, I need to have four 'OR'

[web2py] Creating groups

2013-05-24 Thread sasogeek
I want to add something to my web2py website which is kind of a social network thingy however people term those things now-a-days :P anyway. basically i want to allow users to create groups, and be able to join groups. so basically they click a link create a group which takes them to a page

[web2py] paragraphs in markmin

2013-05-24 Thread weheh
I love markmin, but ... within a blockquoted section, blank lines translate into br/...stuff...br/, not p...stuff.../p. This is awkward. Searching the forum, I've found I can do this: ...first paragraph ... [[NEWLINE]] ...second paragraph [[NEWLINE]] etc. Kind'a fugly, IMHO. Is there a

[web2py] Couchdb compilation_error

2013-05-24 Thread Manuele Pesenti
Hi! just tryed the DAL with a couchdb connection but a simple query like that gave me this error: ServerError: (500, (u'compilation_error', u'Expression does not eval to a function. ((new String((function(simple){if((simple.age

[web2py] Re: DAL: Can I check if a value is in a list

2013-05-24 Thread Anthony
buildCommod = ( for commodity in commodityList: buildCommod += (db.weekly_data.itemgroup == ' + commodity + ')| buildCommod = buildCommod[:-1] + ) RS_Data = db( (db.weekly_data.week == weekno) buildCommod

[web2py] question about digital signatures

2013-05-24 Thread weheh
I've become an ajax junkie. I'm going back and adding digital signatures to my ajax calls. But, it looks like my calls are failing if the user isn't logged in. I suspect I'm interpreting _signature=True and @auth.requires_signature() incorrectly. Why don't they work in the situation where a

[web2py] Re: weird module function call behavior

2013-05-24 Thread Anthony
Are you sure that's the exact code you're using? Also, you should generally do: class A(object): Anthony On Friday, May 24, 2013 2:45:49 AM UTC-4, gthwang5 wrote: I have the following class called a *a.py * class A: def B ( self, var ): return var in my

[web2py] Re: question about digital signatures

2013-05-24 Thread Anthony
Note, user_signature=True is a special case of digitally signed URLs. The generic way to digitally sign a URL is: URL(..., hmac_key=KEY) # create URL URL.verify(request, hmac_key=KEY) # verify signature in subsequent request for the URL That doesn't require user login, but if you use a

[web2py] Re: question about digital signatures

2013-05-24 Thread Anthony
Perhaps we could allow URL(..., user_signature=True) even without login by having it add session.hmac_key if it doesn't already exist. Anthony On Friday, May 24, 2013 9:00:14 AM UTC-4, Anthony wrote: Note, user_signature=True is a special case of digitally signed URLs. The generic way to

[web2py] Re: DAL: Can I check if a value is in a list

2013-05-24 Thread Simon Carr
@manuele @Anthony Many thanks for your help with this. As usual with Web2Py and gluon there is always an easy way. the .belongs() is perfect for what I need. Simon On Friday, 24 May 2013 13:37:37 UTC+1, Anthony wrote: buildCommod = ( for commodity in commodityList:

[web2py] REF: Flash Message

2013-05-24 Thread Teddy Nyambe
is there a way of calling a flash message defined in web2py when an ajax call is made...like the way it is in twitter -- ... Teddy Lubasi Nyambe Opensource Zambia Lusaka, ZAMBIA Cell: +260 97 7760473 website:

[web2py] Re: Couchdb compilation_error

2013-05-24 Thread Manuele Pesenti
Il 24/05/13 14:34, Manuele Pesenti ha scritto: Hi! just tryed the DAL with a couchdb connection but a simple query like that gave me this error: ServerError: (500, (u'compilation_error', u'Expression does not eval to a function. ((new String((function(simple){if((simple.age

[web2py] Re: Append() multiple components to html helper

2013-05-24 Thread Ian W. Scott
Excellent. Thanks. On Thursday, May 23, 2013 6:09:58 PM UTC-4, Anthony wrote: The .components attribute of the helper is a Python list, so you can use all the standard list methods, such as .extend(): wrapper.components.extend([new_component_1, new_component_2,new_component_3 ,

[web2py] Re: REF: Flash Message

2013-05-24 Thread Anthony
If you are using an ajax component, then just set response.flash, and it will work automatically. For other ajax calls, I think you can trick web2py into treating it like a component (for flash message purposes) by setting request.cid=True (or setting it to any value that won't evaluate to

Re: [web2py] Re: Memory leak, SQLite, Windows (7, 2008)

2013-05-24 Thread Michele Comitini
Don't forget about a hidden feature of limitby! q = db1(db1.TABLE_A.ITEM_ID == db1.TABLE_B.id).select(cache=(cache.ram,600), cacheable=True, limitby=(0,100)) limitby by default does a sort on all the extracted field so you test also sorting times, keep that in mind! So what you probably

[web2py] Re: Referencing auth_user custom field in another table

2013-05-24 Thread Chris Teodorski
Anthony, Once again, thanks for the help. Chris On Sunday, 19 May 2013 22:38:48 UTC-4, Chris Teodorski wrote: I will try my best here to explain what I'm after -- I'm clueless on how to do it. I added a custom field to db.auth_user called team_name. Each registered user should have a

Re: [web2py] Re: Testing your app using py.test

2013-05-24 Thread Arnon Marcus
There doesn't necessarily have to be a formal-road-map process in existence, for there to be a road-map-section in the web2py website. For example, I like how Redmine's road-map section is structured: http://www.redmine.org/projects/redmine/roadmap There is also an explanation on updating it on

[web2py] Re: weird module function call behavior

2013-05-24 Thread gthwang5
Unfortunately, that's the exact code that I have. module a sits in my modules folder Here's the snapshot of local variables before the error: global amodule 'applications.charter.modules.a' from 'applications\charter\modules\a.py'datatable'').Bunbound method A.Ba.Aclass

Re: [web2py] Re: Testing your app using py.test

2013-05-24 Thread Anthony
There doesn't necessarily have to be a formal-road-map process in existence, for there to be a road-map-section in the web2py website. For example, I like how Redmine's road-map section is structured: http://www.redmine.org/projects/redmine/roadmap I think you would need a formal process

[web2py] Re: weird module function call behavior

2013-05-24 Thread Anthony
I tried your exact code and can't reproduce the problem. Maybe pack a minimal app that does this and attach it here. Anyway, I assume this isn't the real code you need for your app -- does the same problem occur when you write the real class and method you need? Anthony On Friday, May 24,

[web2py] How to do One-to-Many form Submit on one page

2013-05-24 Thread Lio
Hello everyone, I have a one-to-many relation submission problem. Using the example in book (http://web2py.com/books/default/chapter/29/7#One-form-for-multiple-tables) here: model: db.define_table('client', Field('name')) db.define_table('address', Field('client','reference client',

[web2py] using the new LinkedIn authentication API

2013-05-24 Thread Carl
Come July 15th LInkedIn will stop supporting its old/current authentication/data-retrieval API and move to its new, more flexible system. Has anyone already upgraded? -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from

[web2py] Re: Redirect to another controller function with arguments from a callback function?

2013-05-24 Thread bracquet
Thanks, however I just noticed in the original code that I had incorrectly written the callback function as myButton(). It should have been myCallback(). I modified the code: def search_results(): div = DIV(.) response.view = 'default/search_results.html' return dict(div=div)

[web2py] Re: question about digital signatures

2013-05-24 Thread Niphlod
then every connection (also anonymous) would end up saving a session file .. no ? Il giorno venerdì 24 maggio 2013 15:03:00 UTC+2, Anthony ha scritto: Perhaps we could allow URL(..., user_signature=True) even without login by having it add session.hmac_key if it doesn't already exist.

[web2py] deploy nginx debian6

2013-05-24 Thread Fernando Vieira
I need to deploy with nginx and uwsgi on debian 6, but I am not succeeding anyone has any script, or some tutorial that I can follow -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails

[web2py] Re: add image icon in lamda row value

2013-05-24 Thread Fernando Vieira
see if this can help you links = [dict(header='',body=lambda row: A( IMG(_src=URL(static, images, args=(row.img) ] -- --- 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

[web2py] Re: question about digital signatures

2013-05-24 Thread Anthony
If a page needs a digitally signed URL and you want per-user signatures, then yes, you'd need a session for anyone who accesses the page in question. Anthony On Friday, May 24, 2013 11:44:49 AM UTC-4, Niphlod wrote: then every connection (also anonymous) would end up saving a session file

[web2py] Re: Redirect to another controller function with arguments from a callback function?

2013-05-24 Thread Anthony
It might be helpful if you explain what you're really trying to do. Do you want users to be able to click different links that all point to the /search_results page, but with different types of searches done depending on the link? In that case, why not something like: {{=A('click for more

[web2py] Re: Issues with rendering wiki in html.

2013-05-24 Thread Alan Etkin
I think you submitted a patch one. Do you stil have it? I did not make the patch because there was no agreement on doing per-record format checks. BTW: This thread is related to this issue http://code.google.com/p/web2py/issues/detail?id=1298 -- --- You received this message because

[web2py] Re: Redirect to another controller function with arguments from a callback function?

2013-05-24 Thread bracquet
I wanted to display a resultset using the same view template. To be more specific, we can take an online store example: A navbar will consist of several main links which are categories. A list of subcategory links will show up if you hover over a category link. When a user clicks on a

[web2py] Re: Redirect to another controller function with arguments from a callback function?

2013-05-24 Thread Anthony
So why not use a single function (e.g., search_results), and just pass all the other information as URL args? In the search_results function, you can read the request.args and deliver the appropriate results accordingly. Anthony On Friday, May 24, 2013 1:47:24 PM UTC-4, brac...@gmail.com

[web2py] web2py 2.4.7 is Out

2013-05-24 Thread Massimo Di Pierro
I posted web2py 2.4.7. Includes mostly bug fixes. -- --- 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+unsubscr...@googlegroups.com. For more options,

[web2py] Re: deploy nginx debian6

2013-05-24 Thread Alan Etkin
I need to deploy with nginx and uwsgi on debian 6, but I am not succeeding anyone has any script, or some tutorial that I can follow Did you try the Ubuntu ngix/uwsgi script that ships with the source code installation of web2py? -- --- You received this message because you are

[web2py] Re: Redirect to another controller function with arguments from a callback function?

2013-05-24 Thread bracquet
Yeah, I'll try your suggestion and see what happens: {{=A('click for more information', _href=URL(search_results, args=[ 'myCallback', 1]))}} On Friday, May 24, 2013 1:51:59 PM UTC-4, Anthony wrote: So why not use a single function (e.g., search_results), and just pass all the other

[web2py] Re: deploy nginx debian6

2013-05-24 Thread Fernando Vieira
yes, I did the test with this script and it did not work, I tried before and it worked in ubuntu -- --- 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] Re: question about digital signatures

2013-05-24 Thread Niphlod
it's not what I meant precisely, but the angle just changed a little bit. are you implying that user_signature=True should generate a session.hmac_key automatically ? On Friday, May 24, 2013 6:21:30 PM UTC+2, Anthony wrote: If a page needs a digitally signed URL and you want per-user

Re: [web2py] Re: Testing your app using py.test

2013-05-24 Thread Arnon Marcus
Well, the way I understand it, the admin-app is a web2py app, and so is the examples-app - which is the we2py website, so assuming the admin-app uses a component for that tweeter-feed, then including it in the web2py website should be as trivial as adding it to the examples-app. Is this what you

[web2py] Re: question about digital signatures

2013-05-24 Thread Anthony
On Friday, May 24, 2013 2:46:21 PM UTC-4, Niphlod wrote: it's not what I meant precisely, but the angle just changed a little bit. are you implying that user_signature=True should generate a session.hmac_key automatically ? Well, maybe we should reserve user_signature for logged in

Re: [web2py] Re: Testing your app using py.test

2013-05-24 Thread Anthony
Well, the way I understand it, the admin-app is a web2py app, and so is the examples-app - which is the we2py website, so assuming the admin-app uses a component for that tweeter-feed, then including it in the web2py website should be as trivial as adding it to the examples-app. Is this

[web2py] Re: IDE edit function doesn't work on ipad ?

2013-05-24 Thread Osswalt
Just installed new version 2.4.7 but the web2py web IDE still doesn't work on ipad, both safari and chrome. Greg -- --- 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

[web2py] Re: web2py 2.4.7 is Out

2013-05-24 Thread Alan Etkin
El viernes, 24 de mayo de 2013 14:56:11 UTC-3, Massimo Di Pierro escribió: I posted web2py 2.4.7. Includes mostly bug fixes. Codenamed? -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving

[web2py] Re: web2py 2.4.7 is Out

2013-05-24 Thread Derek
*Navy Platinum Bulldog * On Friday, May 24, 2013 2:46:27 PM UTC-7, Alan Etkin wrote: El viernes, 24 de mayo de 2013 14:56:11 UTC-3, Massimo Di Pierro escribió: I posted web2py 2.4.7. Includes mostly bug fixes. Codenamed? -- --- You received this message because you are subscribed to

[web2py] Re: web2py 2.4.7 is Out

2013-05-24 Thread Anthony
On Friday, May 24, 2013 7:00:42 PM UTC-4, Derek wrote: *Navy Platinum Bulldog * No cheating http://www.codenamegenerator.com/. ;-) -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails

[web2py] No module named PIL

2013-05-24 Thread Alex Glaros
Tried to deploy web2py_curso / gluon / contrib / imageutils.py but received this error: type 'exceptions.ImportError' No module named PIL I tried it on both a Windows 7 and a XP machine. Did I leave something out? thanks, Alex Glaros -- --- You received this message because you are

[web2py] No module named PIL

2013-05-24 Thread Anthony
Sounds like you don't have PIL installed. -- --- 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+unsubscr...@googlegroups.com. For more options, visit

[web2py] Re: No module named PIL

2013-05-24 Thread Alex Glaros
I'll try to install it but can you please tell where and how? I can't find where Python is in the web2py folders. thanks, Alex On Friday, May 24, 2013 9:31:02 PM UTC-7, Anthony wrote: Sounds like you don't have PIL installed. -- --- You received this message because you are subscribed

Re: [web2py] Re: REF: Flash Message

2013-05-24 Thread Teddy Nyambe
Thanx On 24 May 2013 15:38, Anthony abasta...@gmail.com wrote: If you are using an ajax component, then just set response.flash, and it will work automatically. For other ajax calls, I think you can trick web2py into treating it like a component (for flash message purposes) by setting

Re: [web2py] Re: No module named PIL

2013-05-24 Thread Fernando Villarroel
pip install PIL Enviado desde mi iPhone El 25-05-2013, a las 0:35, Alex Glaros alexgla...@gmail.com escribió: I'll try to install it but can you please tell where and how? I can't find where Python is in the web2py folders. thanks, Alex On Friday, May 24, 2013 9:31:02 PM UTC-7,

Re: [web2py] Re: No module named PIL

2013-05-24 Thread Alex Glaros
I have a windows machine. Where do I type pip install PIL? On Friday, May 24, 2013 10:25:58 PM UTC-7, visuallinux wrote: pip install PIL Enviado desde mi iPhone El 25-05-2013, a las 0:35, Alex Glaros alexg...@gmail.com javascript: escribió: I'll try to install it but can you please