[web2py] Re: GAE issue - app works on Appspot - not on desktop

2012-10-14 Thread b00m_chef
So my code works on v1.99 of web2py, but not on 2.0.9 on GAE. On Sunday, October 14, 2012 6:38:21 PM UTC-7, b00m_chef wrote: > > I have an app that I wrote in web2py using version 1.99. It has been > running on appspot for the last 1.5 years with no issues. I recently wanted > to continue work

[web2py] Grid with multiple joins

2012-10-14 Thread Roberto Perdomo
Hi, the grid support left joins from multiple tables? I try this code: fields= [db.examen_factura.id_factura, db.factura.fecha, db.examen.descripcion] left = (db.factura.on(db.factura.id==db.examen_factura.id_factura), db.examen.on(db.examen.id==db.examen_factura.id_examen)) orderby = ['factu

[web2py] Re: GAE issue - app works on Appspot - not on desktop

2012-10-14 Thread b00m_chef
I have taken out the modules import call and placed the code inside each of the controllers. Is there no way to import code into controllers from other files? On Sunday, October 14, 2012 6:38:21 PM UTC-7, b00m_chef wrote: > > I have an app that I wrote in web2py using version 1.99. It has been

Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-14 Thread tomt
I noticed another problem with powertable and web2py 2.0.9 When I created a new app under web2py 2.0.9 and tried to implement a powertable it exhibited some unusual behaviour. On initial callup, the powertable showed all records instead of the number specified by iDisplayLength and the columns

[web2py] GAE issue - app works on Appspot - not on desktop

2012-10-14 Thread b00m_chef
I have an app that I wrote in web2py using version 1.99. It has been running on appspot for the last 1.5 years with no issues. I recently wanted to continue working on it, so I downloaded all my source code. I installed GAE on my desktop, and added the app folder (put it on my root C:\appname ).

[web2py] Re: auth.wiki usage

2012-10-14 Thread Bill Thayer
the index displays the login page but after logging in returns the login page without logging in the user (user is in db) editing the user from auth_user edit user page returns the edit user page without committing the changes. registering a new user or adding one from auth_user simply returns th

[web2py] Re: GAE Import error

2012-10-14 Thread b00m_chef
This error was fixed, but now my app just throws a 500 error, with no error code. On Sunday, October 14, 2012 5:33:59 PM UTC-7, b00m_chef wrote: > > Using web2py 2.0.9 source with AppEngine 1.7.2 > > I get an error in GAE: > > ERROR2012-10-15 00:29:49,611 cgi.py:121] Traceback (most recent

[web2py] GAE Import error

2012-10-14 Thread b00m_chef
Using web2py 2.0.9 source with AppEngine 1.7.2 I get an error in GAE: ERROR2012-10-15 00:29:49,611 cgi.py:121] Traceback (most recent call last): File "C:\gaeapp\gaehandler.py", line 41, in from gluon.settings import global_settings ImportError: No module named gluon.settings --

[web2py] Re: Problem with if loop

2012-10-14 Thread Alan Etkin
What is the problem? --

[web2py] Re: auth.wiki usage

2012-10-14 Thread Alan Etkin
> Made 2 changes but don't know which one fixed the AtributeError. Hard to tell if the filedata blob field is working because I doubt it has something to do with the changes in the patch to tools.py. I have created a scaffolding app with the default Sqlite connection that extends the wiki_page

Re: [web2py] ondelete and onaccept

2012-10-14 Thread Alan Etkin
For me the behavior is the expected (because the form was accepted and the record deleted). Perhaps you can avoid executing onaccept inside the handler like this: def myonaccept(form): if form.vars.delete_this_record return ... --

[web2py] Re: auth.wiki usage

2012-10-14 Thread Bill Thayer
#code now looks like this, put the represent= inside the # call to extra_fileds . . . auth.settings.extra_fields["wiki_media"] = [ Field("filedata", "blob", represent = lambda value,row: \ A('get it', _href=URL('download', args=value))),] auth.define_tables(username=True, migr

[web2py] Re: existing tables in plugin_wiki

2012-10-14 Thread finlayson
I have got the same error message with the classic friend database within a wiki page. So now waiting for an upgrade? Or can you please show what to cahnge. If I remember well in an earlier version of web2py 1.99.6 there was no problem... Op woensdag 1 augustus 2012 17:38:27 UTC+2 schreef Massi

[web2py] Problem with if loop

2012-10-14 Thread k vamshi
{{if k ==0:}} {{for i in dic:}} {{=k}} {{=i.Nam}} {{=LI(A(i.Nam, _href=URL("download",args=i.File)))}}   CREATED ON :{{=i.Given_on}} {{pass}} {{pass}}

[web2py] Re: auth.wiki usage

2012-10-14 Thread Alan Etkin
> Hmmm. These lines do not work so I'm unsure where to insert them. I wonder if you shouldn't call .define_tables() before calling auth.wiki(), there could be need of configuring auth tables before creating the wiki tables. --

[web2py] Re: auth.wiki usage

2012-10-14 Thread Bill Thayer
Hmmm. These lines do not work so I'm unsure where to insert them. db.wiki_media.filename.uploadfield='filedata' db.wiki_page.filedata.represent = lambda value,row: \ A('get it', _href=URL('download', args=value)) Here's the error as usual. Traceback (most recent call last): File "C:\web2py

[web2py] Re: auth.wiki usage

2012-10-14 Thread Bill Thayer
Cool! The wiki_ tables are now visible in the app admin pages! My app does not produce errors wrt wiki_. However, the login page will not login any users, I can not register a new user and cannot create or edit users from app admin although the auth_ tables are all visible. In fact I just tried

[web2py] Re: auth.wiki usage

2012-10-14 Thread Alan Etkin
El domingo, 14 de octubre de 2012 15:56:05 UTC-3, Bill Thayer escribió: > > I tried your patch but the tables were not defined. Is my db.py code > correct? The commented out code causes an error 'exceptions.AttributeError'>('DAL' object has no attribute 'wiki_media') > but when commented out the

Re: [web2py] Re: Web2Py + OAuth2 Server

2012-10-14 Thread Michele Comitini
it was about time. Thanks for the info. 2012/10/14 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'

[web2py] Re: auth.wiki usage

2012-10-14 Thread Bill Thayer
I tried your patch but the tables were not defined. Is my db.py code correct? The commented out code causes an error('DAL' object has no attribute 'wiki_media') but when commented out the appadmin displays all the tables except the wiki_ tables. from gluon import DAL from gluon.tools import Aut

[web2py] Re: auth.wiki usage

2012-10-14 Thread Bill Thayer
Thank you. I voted for it. On Sunday, October 14, 2012 9:43:03 AM UTC-5, Alan Etkin wrote: > > I didn't expect you wanted to add a field to the table after calling .,, >> > > I opened an issue in the project page > > http://code.google.com/p/web2py/issues/detail?id=1087 > > --

[web2py] Re: IS_STRONG and CRYPT

2012-10-14 Thread piero crisci
I made the changes you said, I also test the app with the V. 1.99.7 I also create a new app called TEST with the wizard without add anything else. Once created the new APP i just add this lines to db.py : db.auth_user.password.requires = [IS_STRONG(),CRYPT(key=auth.settings.hmac_key)] I chose

[web2py] Re: Quickest way to learn web2py

2012-10-14 Thread martzi
First, you have to program a fair bit in python. There are many online tutorials easy to grasp. Choose anyone that suits your reading. Personally the online book, http://web2py.com/book is the best resource so far, read the chapters on the Core. (I like response / request ) After all what you w

[web2py] Re: pyfilesystem support (store uploads in Dropbox)

2012-10-14 Thread Massimo Di Pierro
This should work. It doesen't. Can you use the pyfilesystem without web2py? On Sunday, 14 October 2012 03:49:51 UTC-5, apps in tables wrote: > > Hi, > I need help completing/correcting the following: > > > easy_install pyfilesystem > > >>> import fs.dropboxfs > >>> myfs = fs.dropboxfs.dropboxfs(bu

[web2py] Re: on_define=set_requirement

2012-10-14 Thread Massimo Di Pierro
Yes. I just wanted to try isolate the problem. On Sunday, 14 October 2012 01:21:00 UTC-5, Annet wrote: > > 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(

[web2py] Re: Fitching Data From json

2012-10-14 Thread Alan Etkin
> I Have a website that has a page returning some rows in json , now how can i fitch those rows and insert them to my database ? *# *raw is the string with the json response import simplejson rows = simplejson.loads(raw) fields = db..fields() for row in rows: db..update_or_insert(**dict([(ke

Re: [web2py] insert with ID

2012-10-14 Thread Alec Taylor
http://web2py.com/books/default/chapter/29/06#insert On Mon, Oct 15, 2012 at 1:53 AM, Hassan Alnatour wrote: > Dear ALL , > > How can i do an insert and added the id i want ? > > Regards, > > -- > > > --

[web2py] insert with ID

2012-10-14 Thread Hassan Alnatour
Dear ALL , How can i do an insert and added the id i want ? Regards, --

[web2py] Re: auth.wiki usage

2012-10-14 Thread Alan Etkin
> > I didn't expect you wanted to add a field to the table after calling .,, > I opened an issue in the project page http://code.google.com/p/web2py/issues/detail?id=1087 --

[web2py] Re: extend with an if condition

2012-10-14 Thread Anthony
I don't think that will work. Note, the {{extend}} and {{include}} directives are not Python code and are processed before any of the Python code is executed. You can do a conditional {{include}}, but technically in that case both included views will be inserted in the view code, with only one

[web2py] Re: extend with an if condition

2012-10-14 Thread martzi
Yes it is. nothing prevents you from testing it out. On Sunday, October 14, 2012 2:52:03 PM UTC+2, qwer qwer wrote: > > is it not possible? > {{if condition:}} > {{extends 'layout1.html'}} > {{else:}} > {{extends 'layout2.html'}} thanks > --

[web2py] Re: auth.wiki usage

2012-10-14 Thread Alan Etkin
AttributeError: 'Table' object has no attribute 'filedata' So I think I'm close. Just not aware of how to add that field yet. > > I didn't expect you wanted to add a field to the table after calling .define_table. AFAIK that is not possible. However, you could still use virtual fields, which c

[web2py] Re: extend with an if condition

2012-10-14 Thread martzi
On Sunday, October 14, 2012 2:52:03 PM UTC+2, qwer qwer wrote: > > is it not possible? > {{if condition:}} > {{extends 'layout1.html'}} > {{else:}} > {{extends 'layout2.html'}} thanks > --

[web2py] Removing files from database folder

2012-10-14 Thread praveen krishna
I am uploading some files to server in order to extract some information .After my task is done, I want remove those files when I am trying to upload another file the previously loaded files are still stored .I came to know that these files are stored in database folder of web2py.Is there any w

[web2py] extend with an if condition

2012-10-14 Thread qwer qwer
is it not possible? {{if condition:}} {{extends 'layout1.html'}} {{else:}} {{extends 'layout2.html'}} thanks --

[web2py] Fitching Data From json

2012-10-14 Thread David Marko
Use excelent requests library ... http://docs.python-requests.org/en/latest/ to get json data. Processing is simple then in python. --

[web2py] Fitching Data From json

2012-10-14 Thread Hassan Alnatour
Dear ALL, I Have a website that has a page returning some rows in json , now how can i fitch those rows and insert them to my database ? regards --

[web2py] u'Cannot add or update a child row

2012-10-14 Thread Hassan Alnatour
Dear ALL , I am trying to move a databse from sqlite to mysql using csv import / export all , and i am getting this error : (1452, u'Cannot add or update a child row: a foreign key constraint fails (`dbi3zif3`.`auth_event`, CONSTRAINT `auth_event_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES

[web2py] Re: doc suggestion

2012-10-14 Thread Niphlod
ehm what are "optional change bars" like ? On Sunday, October 14, 2012 1:25:37 AM UTC+2, weheh wrote: > > Optional change bars could be useful on the online documentation. --

Re: [web2py] Re: Legacy db / references

2012-10-14 Thread Niphlod
the format parameter is a formatting string, no need to include that in parenthesis format='%(field)s - %(another_field)s' On Sunday, October 14, 2012 9:00:57 AM UTC+2, Kenneth wrote: > > Wauu, thanks Bill. > > That was exact what was missing. I was looking in completly different > directions.

[web2py] pyfilesystem support (store uploads in Dropbox)

2012-10-14 Thread apps in tables
Hi, I need help completing/correcting the following: easy_install pyfilesystem >>> import fs.dropboxfs >>> myfs = fs.dropboxfs.dropboxfs(bucket, prefix, dropbox_access_key,dropbox_secret_key) >>> db.define_table('test',Field('file','upload',uploadfs = myfs)) You have a good one... Ashraf --

[web2py] Re: IS_STRONG and CRYPT

2012-10-14 Thread piero crisci
I will remove the errors as soon as i get home. Do you think is this the reason for the rising of the IS_STRONG() controls in the db.auth_user update?. Let me know if i need to post controls, views or models. Thank you all , Richard and Massimo. I am trying to study all the framework, looking fo

Re: [web2py] Re: Legacy db / references

2012-10-14 Thread Kenneth Lundström
Wauu, thanks Bill. That was exact what was missing. I was looking in completly different directions. Anybody else reading this, the correct notation is: format=('%(asset_category_name)s') Kenneth I'm certainly no expert but I might try to define: ref_asset_category.format=('%(asset_categor