[web2py] Re: on_define=set_requirement

2012-10-13 Thread Annet
Massimo, Thanks for your reply. Does it work if you do? > > db.nodeRelatedName.relatedID.requires=[IS_IN_DB(db,'node.id','%(id)s',zero=T('select > > a > value')),IS_NOT_IN_DB(db(db.nodeRelatedName.nodeID==request.vars.nodeID),'nodeRelatedName.relatedID',error_message=T('combination > > node

[web2py] Re: Legacy db / references

2012-10-13 Thread Bill Thayer
I'm certainly no expert but I might try to define: ref_asset_category.format=('%(asset_category_name)s') or something like that. Check my syntax of course. Hope it works. -Bill On Saturday, October 13, 2012 7:11:35 PM UTC-5, Kenneth wrote: > > Hello, > > this is my first time trying to connec

[web2py] Re: auth.wiki usage

2012-10-13 Thread Bill Thayer
Hello Allen, my code looks like: from gluon import DAL from gluon.tools import Auth, Crud, Service, PluginManager, prettydate, Wiki auth = Auth(db) crud, service, plugins = Crud(db), Service(), PluginManager() ## create all tables needed by auth if not custom tables auth.define_tables(username=Tru

[web2py] Re: Web2Py + OAuth2 Server

2012-10-13 Thread Luther Goh Lu Feng
Seems that Oauth 2.0 is finalised as an official standard in IETF RFCS 6749 and 6750: http://dickhardt.org/2012/10/oauth-2-0/ On Monday, August 20, 2012 9:33:10 PM UTC+8, João Alves wrote: > > Hello, > > I didn't develop an OAuth 2.0 server to the web2py's core but I wrote a > module instead. Yo

Re: [web2py] Re: Cannot connect to Oracle from web2py? — Just want to use the DAL…

2012-10-13 Thread Alec Taylor
On Sun, Oct 14, 2012 at 1:21 AM, Massimo Di Pierro wrote: > Yes and no. You can generate sql without connection but you still need the > driver and looks like we2py cannot find the cx_Oracle driver. Could it be > you have two versions of python (one with the driver, and one running > web2py)? Anyw

[web2py] Legacy db / references

2012-10-13 Thread Kenneth Lundström
Hello, this is my first time trying to connect to a legacy database. My database models file looks like this: db.define_table('ref_asset_category', Field('asset_category_id', type='id'), Field('asset_category_name', type='string')) db.define_ta

[web2py] doc suggestion

2012-10-13 Thread weheh
Optional change bars could be useful on the online documentation. --

[web2py] Re: Cannot connect to Oracle from web2py? — Just want to use the DAL…

2012-10-13 Thread Bill Thayer
I did not have much luck with 64 bit anything. I think Oracle XE might can be 64 bit but I am using cx_Oracle-5.1.2-11g.win32-py2.7 with 32 bit python 2.7 and web2py 2.0.9. On Saturday, October 13, 2012 4:58:55 AM UTC-5, Alec Taylor wrote: > > Getting this error: > raise RuntimeError, "no d

[web2py] ondelete and onaccept

2012-10-13 Thread David Sorrentino
Hi there, Maybe I just misunderstood the online book, but I would like to solve my doubts about this: In chaper #07, speaking about the CRUD method *ondelete*, the book says: ondelete is called in place of onaccept when a record is deleted via an > "update" form. > I added both to my *crud.updat

[web2py] Re: session in redis

2012-10-13 Thread Massimo Di Pierro
Indeed. Good work Niphlod! On Saturday, 13 October 2012 14:19:39 UTC-5, rif wrote: > > It is working for me and the performance is very close to session.forget() > > Good work, > -rif > > sâmbătă, 13 octombrie 2012, 20:05:24 UTC+3, Niphlod a scris: >> >> it's in trunk. Docs will be available short

[web2py] Re: session in redis

2012-10-13 Thread rif
It is working for me and the performance is very close to session.forget() Good work, -rif sâmbătă, 13 octombrie 2012, 20:05:24 UTC+3, Niphlod a scris: > > it's in trunk. Docs will be available shortly but just looking at the > docstring it should be painless. > > On Saturday, October 13, 2012 2

[web2py] Re: diaplay many sql forms with a single submit button

2012-10-13 Thread qwer qwer
thanks :) On Saturday, October 13, 2012 4:09:26 PM UTC+5:30, qwer qwer wrote: > > hello, >I want to display many sql forms,but they should have a single submit > button.when the submit button is pressed all the values should get updated > into their respective tables.is it possible?how to do

[web2py] themeing SQLFORM , SQLFORM.grid etc

2012-10-13 Thread vivek
Hi , I recently got myself a bootstrap extended frontend layout from theme forest. I want to be able to use those elements with things like SQLFORM & grid in web2py. Please advice. Thanking you, Regards, Vivek --

[web2py] Re: session in redis

2012-10-13 Thread Niphlod
it's in trunk. Docs will be available shortly but just looking at the docstring it should be painless. On Saturday, October 13, 2012 2:49:18 PM UTC+2, Jose C wrote: > > +1 request for full Redis session integration. Really like Redis' > features over memcache, especially the auto- `save-to-db`

[web2py] Re: while loop with multiple results

2012-10-13 Thread Carl
If the first or second name contains an "is" you're not going to get the desired substrings. --

Re: [web2py] Issues with GAE?

2012-10-13 Thread David Sorrentino
Perfectly working! :) Thanks Massimo!! I wish you a wonderful Saturday, David On 13 October 2012 16:38, Massimo Di Pierro wrote: > I just fixes this. Good cache. This is a part of a redesign of the > custom_importer. This should result in a faster web2py on GAE. > Before web2py was using the cu

[web2py] Re: IS_STRONG and CRYPT

2012-10-13 Thread Massimo Di Pierro
You do not need two decorators: @auth.requires_login() @auth.requires_membership('risorse_umane' or 'admin') auth.requires_membership also requires login. You cannot do @auth.requires_membership('risorse_umane' or 'admin') because that is the same as @auth.requires_membership('risorse_umane') s

[web2py] Re: while loop with multiple results

2012-10-13 Thread Massimo Di Pierro
replace while (count < total): name_is = text.find("is")+3 text = text[name_is:100] where_is = text.find(" ") print text[0:where_is] count = count + 1 with tag = DIV() # or PRE() while (count < total): name_is = text.find("is")+3 text = text[name_is:100] where_is = text.find(" ") tag.append(text

Re: [web2py] Issues with GAE?

2012-10-13 Thread Massimo Di Pierro
I just fixes this. Good cache. This is a part of a redesign of the custom_importer. This should result in a faster web2py on GAE. Before web2py was using the custom importer for every import thus creating problems. On Saturday, 13 October 2012 09:12:26 UTC-5, David Sorrentino wrote: > > Hello e

[web2py] while loop with multiple results

2012-10-13 Thread Mrq
Hi, How do I print all results from a while loop to a view page? Code example: text = "Mothers name is Maria \n Fathers name is Josef \n Childsname is Jesus " total = text.count("is") count = 0 where_is = 0 name_is = 0 while (count < total): name_is = text.find("is")+3 text = text[name_is:100]

[web2py] Re: diaplay many sql forms with a single submit button

2012-10-13 Thread Massimo Di Pierro
db.define_table('one',Field('field1').) db.define_table('two',Field('field2').) db.define_table('three',Field('field3').) form = SQLFORM.factory(db.one,db.two,db.three).process() if form.accepted: db.one.insert(field1 = form.vars.field1) db.one.insert(field2 = form.vars.field

[web2py] Re: Cannot connect to Oracle from web2py? — Just want to use the DAL…

2012-10-13 Thread Massimo Di Pierro
Yes and no. You can generate sql without connection but you still need the driver and looks like we2py cannot find the cx_Oracle driver. Could it be you have two versions of python (one with the driver, and one running web2py)? Anyway, open a ticket about this. we can change it so that you can

[web2py] Re: Problem with IS_STRONG() and CRYPT() methods

2012-10-13 Thread piero crisci
Hello Massimo and hello guys, sorry to bother you all. I got a problem with IS_STRONG and CRYPT(). Richard is trying to help me to solve it. I posted a new question because the problem is similar to this one but it regards the user approval from db.auth_user with the STRONG and CRYPT() activate

[web2py] Re: on_define=set_requirement

2012-10-13 Thread Massimo Di Pierro
Does it work if you do? db.nodeRelatedName.relatedID.requires=[IS_IN_DB(db,'node.id','%(id)s',zero=T('select a value')),IS_NOT_IN_DB(db(db.nodeRelatedName.nodeID==request.vars.nodeID),'nodeRelatedName.relatedID',error_message=T('combination node and related name already in database'))] On

Re: [web2py] IS_STRONG and CRYPT

2012-10-13 Thread piero crisci
I am using the web2py framework on win 7 launching it with the web2py.exe As you said i checked the link but is alright. I have no clue what is wrong. I got the rise of the control of IS_STRONG() even in the update section. I have seen that if i change the password and i submit the update, the

[web2py] Issues with GAE?

2012-10-13 Thread David Sorrentino
Hello everybody! ;) I updated web2py to the last stable version and now I'm getting this error: ERROR2012-10-13 14:06:26,000 wsgi.py:219] > Traceback (most recent call last): > File "/home/dapids/google_appengine/google/appengine/runtime/wsgi.py", > line 208, in Handle > for chunk in re

[web2py] Re: crud.messages.record_created

2012-10-13 Thread Massimo Di Pierro
I believe this is a workflow issues. By storing the message in session and retrieving it in models, you probably always the display the previously set message and not the one you want. You must set the messages before you call crud update and not after. Also if row is None, crud.update reverts

[web2py] impersonate anonymous

2012-10-13 Thread weheh
How does one go about impersonating an anonymous user, the effect being that session will take on the anonymous user's last session state? impersonate/0 would restore session to its state before beginning impersonation. --

[web2py] Re: session in redis

2012-10-13 Thread Jose C
+1 request for full Redis session integration. Really like Redis' features over memcache, especially the auto- `save-to-db` config option. Would you prefer opening a feature request ticket? --

[web2py] Re: Whats your experience with memory leaks in web2py apps?

2012-10-13 Thread villas
+1 > > I am considering removing the -N option and disabling cron by default. > --

[web2py] diaplay many sql forms with a single submit button

2012-10-13 Thread qwer qwer
hello, I want to display many sql forms,but they should have a single submit button.when the submit button is pressed all the values should get updated into their respective tables.is it possible?how to do it? thanks --

[web2py] Cannot connect to Oracle from web2py? — Just want to use the DAL…

2012-10-13 Thread Alec Taylor
Getting this error: raise RuntimeError, "no driver available %s", self.drivers TypeError: raise: arg 3 must be a traceback or None Even though I've installed the driver (instantclient-basic-windows.x64-11.2.0.3.0.zip from http://www.oracle.com/technetwork/topics/winx64soft-089540.html; + s

[web2py] on_define=set_requirement

2012-10-13 Thread Annet
In db.py I define the following table: def set_requirement(nodeRelatedName): nodeRelatedName.relatedID.requires=[IS_IN_DB(db,'node.id','%(id)s',zero=T('select a value')),IS_NOT_IN_DB(db(db.nodeRelatedName.nodeID==request.vars.nodeID),'nodeRelatedName.relatedID',error_message=T('combination n

Re: [web2py] web2py integration with apache alongside PHP

2012-10-13 Thread Kenneth Lundström
Hi, the is no problems running both PHP and web2py side by side. If you're running Apache the easiest way of setting up web2py is to use a subdomain, like web2py.yourdomain.com, and vhosts in Apache. If you'd like a copy of one of my vhost files for a web2py site let me know and I'll send yo