[web2py] Get Auto-Generated Column Value on Insert or Update

2010-10-08 Thread Dane
Hello, I have a db.table.insert and a db(query).update that both generate timestamp columns. Is there a way for me to get the generated values of these without hitting the db again? Thanks.

Re: [web2py] crud.select syntax

2010-10-08 Thread rochacbruno
crud.select expects 2 arguments crud.select(db.tablename, query) returns a list of records selected from the table. > persons=crud.select(db.person, db.person.id>0) Em 09/10/2010, às 02:07, andrej burja escreveu: > hi > > in model.py i have > > db.define_table('person', >Field('name'),

[web2py] crud.select syntax

2010-10-08 Thread andrej burja
hi in model.py i have db.define_table('person', Field('name'), format='%(name)s') in controllers/default.py i have def ustvari_oseba(): form=crud.create(db.person) persons=crud.select(db.person) return dict(form=form,persons=persons) form is ok, but persons is not

[web2py] Re: format=

2010-10-08 Thread andrej burja
is it ok if i see only id in the drop-down filed writing db.tecaj.oseba.requires=IS_IN_DB(db,'oseba.id') and ime priimek when db.tecaj.oseba.requires=IS_IN_DB(db,'oseba.id','%(ime)s %(priimek)s') On Oct 4, 4:20 pm, mdipierro wrote: > This > >    db.tecaj.oseba.requires=IS_IN_DB(db,'oseba.id'

Re: [web2py] Re: almost have linkedin oauth working within web2py application. just need one more push

2010-10-08 Thread Carl Roach
Thanks M. I'll look into that but I will need full access to LinkedIn (name, company, contacts) I'm nearly there it's just the vague error message that had me stumped :) On 9 Oct 2010, at 04:18, mdipierro wrote: > If you only need authentication you may want to consider using rpx as > shown in

[web2py] Re: Jobsite on GAE

2010-10-08 Thread Sujith
Hi I have customized the Jobsite appliance. In the _ah/admin the following tables are created: web2py_session_init web2py_tickets_init The other tables defined in the model are not getting created. On most of the pages, an Internal error is being generated. This is one of the entries from web2py_

[web2py] Re: almost have linkedin oauth working within web2py application. just need one more push

2010-10-08 Thread mdipierro
If you only need authentication you may want to consider using rpx as shown in this video: http://vimeo.com/13485916 On Oct 8, 7:36 pm, Carl wrote: > I've been following the instructions > athttp://code.google.com/p/python-linkedin/ > to add linkedin authentication. I grabbed the latest revisio

[web2py] almost have linkedin oauth working within web2py application. just need one more push

2010-10-08 Thread Carl
I've been following the instructions at http://code.google.com/p/python-linkedin/ to add linkedin authentication. I grabbed the latest revision (#20) from svn. I've started by creating a new app (and called it oauth) within web2py to keep things simple. Into default.py I've added the following f

Re: [web2py] Re: showing computed field

2010-10-08 Thread Richard Vézina
I try, I was really confuse it didn't work. I will try again next week. It is under w2p 1.83.2 Richard On Fri, Oct 8, 2010 at 4:55 PM, mdipierro wrote: > before the db.read add > > db.ref_eregistry.report_name.readable=True > > On Oct 8, 2:55 pm, Richard Vézina wrote: > > Hello, > > > > How

[web2py] Re: showing computed field

2010-10-08 Thread mdipierro
before the db.read add db.ref_eregistry.report_name.readable=True On Oct 8, 2:55 pm, Richard Vézina wrote: > Hello, > > How can I make a computed field appear in a crude.read? > > For example : > > db.ref_eregistry.report_name.compute=lambda r: > r['report_date'].strftime("%Y%m%d")+r['report_aut

Re: [web2py] Re: tip of the day: how to make a ON/OFF toggle button to represent a boolean field

2010-10-08 Thread Michele Comitini
with a .load component, it wouldn't be more cleaner and reusable? 2010/10/8 Thadeus Burgess : > How about this... > > It allows to use it in any normal form, you still have to press the > submit button, but it means no security issues. It also downgrades > gracefully if the client does not have ja

[web2py] showing computed field

2010-10-08 Thread Richard Vézina
Hello, How can I make a computed field appear in a crude.read? For example : db.ref_eregistry.report_name.compute=lambda r: r['report_date'].strftime("%Y%m%d")+r['report_author']+r['report_num'] But if I do crud.read(db.ref_eregistry,1) I will have all the other field except the compute field

Re: [web2py] Re: Form validation service in web2py

2010-10-08 Thread Michele Comitini
Yes it is definetly a feasible, and json service support in web2py is so lean and clean that you will like it for sure. You could have some troubles if need to do cross domain AJAX for your use case, but if you go apache you can proxy requests to destination with little effort. hope that helps m

Re: [web2py] Re: Twitter registration/login

2010-10-08 Thread Michele Comitini
Albert, Bruno, thank you guys for replying on behalf of me! I can keep going climbing without worries of leaving email unread ;-) 2010/10/8 Francisco Costa : > nevermind.. I've already got it. > Thank you very much for your help Albert! > > On Oct 8, 5:30 pm, Albert Abril wrote: >> Yes, Michell

[web2py] Re: Jobsite on GAE

2010-10-08 Thread mdipierro
On Oct 8, 1:28 pm, Sujith wrote: > Hi Massimo, > > Thanks for the superfast response. > The views and controllers seem to be working now. But i cannot see any > data on the website. can you explain which url shows the data and which one does not? This is probably an application error. > The ap

Re: [web2py] Re: SyntaxError at line 2 on version 1.86.3

2010-10-08 Thread Mariano Reingart
On Fri, Oct 8, 2010 at 2:03 AM, Jonathan Lundell wrote: > On Oct 7, 2010, at 9:18 PM, mdipierro wrote: >> >> Can you check if it is fixed in trunk? > > It should fix the bogus compile error, yes. Whether the the error > highlighting will work, I don't know; I'm having trouble following the logic.

[web2py] Re: Jobsite on GAE

2010-10-08 Thread Sujith
Hi Massimo, Thanks for the superfast response. The views and controllers seem to be working now. But i cannot see any data on the website. The appliance seems to be working fine and i can see the data when running under web2py. Thanks a lot. :) Sujith On Oct 8, 11:22 pm, mdipierro wrote: > You

[web2py] Re: Jobsite on GAE

2010-10-08 Thread mdipierro
You should not have this line: from gluon.dal import * that module is experimental and it is not the proper way of using it. It does not support GAE at all. If you remove that line everything else I see should work fine on GAE. Massimo On Oct 8, 1:20 pm, Sujith wrote: > Hi all, > > I am

[web2py] Jobsite on GAE

2010-10-08 Thread Sujith
Hi all, I am trying to make the "jobsite" appliance work on GAE. I edited the model(db.py) of jobsite to suit GAE. I am getting the following error when running under devappserver of gae sdk. *** WARNING 2010-10-08 18:10:40,069 datastore_file_stub.py:657] Coul

[web2py] Re: web2py error on windows

2010-10-08 Thread mdipierro
yes, this was fixed in 1.86.2. The markmin folder was not packaged properly in the binary distributions On Oct 8, 4:38 am, Jorge Sousa wrote: > Hi, > > I'm trying this framework on windows but cannot startup due to the > following error. > > C:\tools\Python26\web2py>web2py.exe > Traceback (most

[web2py] Re: error in call to rows=dbib().select(dbib.Convenios.ALL)

2010-10-08 Thread mdipierro
Do you have a dbib.define_table('Convenios',...,migrate=True or False) without this, web2py does not know that the table exists. On Oct 8, 11:22 am, José Luna Venezuela wrote: > i'm having problems with this funtión > rows=dbib().select(dbib.Convenios.ALL) > > Data base def > > import pyodbc >

[web2py] Re: login

2010-10-08 Thread mdipierro
Are you using the plain welcome app without modification? Did you register? On Oct 8, 12:25 pm, JC wrote: > When I'm using Web2py, even for the Welcome app, the login gives me an > error: invalid login. I have made no changes to the login code -- is > there something I needed to add to make it wo

[web2py] login

2010-10-08 Thread JC
When I'm using Web2py, even for the Welcome app, the login gives me an error: invalid login. I have made no changes to the login code -- is there something I needed to add to make it work? I have tried several different email addresses and passwords. Running Version 1.86.2 on Windows 7.

[web2py] Re: error on compile

2010-10-08 Thread mdipierro
I will add to web2y better debugging for this case. Anyway, if you just try call all the actions in your code you will find that one (or more of them) fail. Those that fail probably have indentation issues which cause compilation to fail. On Oct 8, 5:04 am, ceriox wrote: > hi all i have this er

[web2py] Re: pygooglevoice

2010-10-08 Thread Martin.Mulone
http://blogs.sitepoint.com/2010/10/08/the-w3c-and-the-html5-isnt-ready-backlash/ On Oct 6, 4:04 pm, mdipierro wrote: > BTW... what do you think about this? > > http://www.infoworld.com/d/developer-world/w3c-hold-html5-in-websites... > > On Oct 6, 1:46 pm, mart wrote: > > > > > which one... googl

[web2py] Re: GAE appadmin weirdness

2010-10-08 Thread mattynoce
i'm having a similar type of issue. i have the following field: Field('friends','list:integer', default=[], readable=False, writable=False), and it generally works fine. however, when i'm in the gae appadmin and i try to modify a user's record, if the user has an empty list for friends, i get thi

Re: [web2py] Re: Session data lose...

2010-10-08 Thread Jason Brower
I am glad my poor programming bring web2py to even higher standards. To tell, I found a small app called AMPY, it implements the amp protocal stack that twisted uses but has both blocking and asyncro communication, blocking is I think what we would need in this case and it seems, at least in m

[web2py] Re: error on compile

2010-10-08 Thread ceriox
i'm sorry but i don't want to send my application... if u want u can tell me how to find the error ... On 8 Ott, 12:27, Raja sekhar wrote: > send the application program > > On Fri, Oct 8, 2010 at 3:34 PM, ceriox wrote: > > hi all i have this error when i'm compiling my app > > > Compilazione fa

[web2py] Re: Twitter registration/login

2010-10-08 Thread Francisco Costa
nevermind.. I've already got it. Thank you very much for your help Albert! On Oct 8, 5:30 pm, Albert Abril wrote: > Yes, Michelle Commitini wrote the welcome app with twitter authetication > with OAuth, here the > link:https://code.google.com/r/michelecomitini-facebookaccess/source/brows... > >

Re: [web2py] Re: Twitter registration/login

2010-10-08 Thread Bruno Rocha
Install mercurial, open a console and: hg clone https://michelecomitini-facebookaccess.googlecode.com/hg/michelecomitini-facebookaccess 2010/10/8 Francisco Costa > is there a link to direct download the application? > > > On Oct 8, 5:30 pm, Albert Abril wrote: > > Yes, Michelle Commitini wrot

[web2py] Re: Twitter registration/login

2010-10-08 Thread Francisco Costa
is there a link to direct download the application? On Oct 8, 5:30 pm, Albert Abril wrote: > Yes, Michelle Commitini wrote the welcome app with twitter authetication > with OAuth, here the > link:https://code.google.com/r/michelecomitini-facebookaccess/source/brows... > > On Fri, Oct 8, 2010 at

Re: [web2py] Twitter registration/login

2010-10-08 Thread Albert Abril
Yes, Michelle Commitini wrote the welcome app with twitter authetication with OAuth, here the link: https://code.google.com/r/michelecomitini-facebookaccess/source/browse/#hg/applications/helloTwitter On Fri, Oct 8, 2010 at 6:12 PM, Francisco Costa wrote: > Hello! > Is there any available applica

[web2py] error in call to rows=dbib().select(dbib.Convenios.ALL)

2010-10-08 Thread José Luna Venezuela
i'm having problems with this funtión rows=dbib().select(dbib.Convenios.ALL) Data base def import pyodbc dbib=DAL('mssql://user:passw...@databaseserver/database? DRIVER={FreeTDS}') in controller: def convenios(): rows=dbib().select(dbib.Convenios.ALL) # if I use this it dosen't works...

Re: [web2py] Re: web2py error on windows

2010-10-08 Thread Jorge Sousa
Hi, I'm trying to use v1.86.3. In the meantime I went to the general src version, and that one runs just fine. It only complains about a missing tk module, but the framework boots OK and I can move on. So, I'll stay away from the windows "only" version. Have fun, Jorge On Fri, Oct 8, 2010 at 1

[web2py] Twitter registration/login

2010-10-08 Thread Francisco Costa
Hello! Is there any available application with twitter register/login?

Re: [web2py] Re: SyntaxError at line 2 on version 1.86.3

2010-10-08 Thread Jonathan Lundell
On Oct 7, 2010, at 9:18 PM, mdipierro wrote: > > Can you check if it is fixed in trunk? It should fix the bogus compile error, yes. Whether the the error highlighting will work, I don't know; I'm having trouble following the logic. > > On Oct 7, 1:25 pm, Jonathan Lundell wrote: >> On Oct 7, 2

Re: [web2py] Re: Offline apps

2010-10-08 Thread Fabio Alessandro Locati
Would it be a solution moving to another provider (like VPS.net)? Is there any other way that would allow me to do this without changing provider? 2010/10/8 mdipierro > If the tables have a uuid field (required for sinchronization) you can > use web2py's > > db.export_to_csv_file(...) > db.impor

[web2py] Re: Offline apps

2010-10-08 Thread mdipierro
If the tables have a uuid field (required for sinchronization) you can use web2py's db.export_to_csv_file(...) db.import_form_csv_file(...) anyway, because of GAE's limitation to 1000 bytes, that is not a solution for you. Massimo On Oct 8, 8:35 am, Fabio Alessandro Locati wrote: > Hi, > I hav

[web2py] Re: Importing modules...

2010-10-08 Thread mdipierro
If mymodule does not use absolute imports the following will work but I suggest the cleaner shortcut mymodule=local_import('mymodule') On Oct 8, 8:07 am, Jason Brower wrote: > It hsa been asked before but I am still trying to understand it. > I have the mods for ampy a tool to let me use AMP ne

[web2py] Re: f.y.i. pypy 1.3

2010-10-08 Thread mdipierro
This is probably now fixed in trunk with the patch submitted yesterday by Ron. On Oct 8, 3:28 am, cjrh wrote: > On Oct 7, 11:35 pm, mdipierro wrote: > > > yes but it has a memory leak because some files are not closed by > > default. It can be fixed. > > Yes, of course.   I expect that the same

[web2py] Re: Session data lose...

2010-10-08 Thread mdipierro
Your patch is still useful because by-the-book that is teh right thing to do. It should fix the problem with PyPy. On Oct 8, 12:12 am, ron_m wrote: > Jason, > > I wrote a little test program and it looks like a file object is > cleaned up by the library when it is unbound so based on what I see >

[web2py] Re: Passing args to static CSS files

2010-10-08 Thread mdipierro
It was an issue with web2py_ajax.html. It should be fixed in trunk, please give it a try. On Oct 7, 11:58 pm, Bruno Rocha wrote: > I am trying many ways, does not works here > > Calling directly in browser > :http://127.0.0.1:8000/examples/static/css/menu.css?version=1234(Thats > works) > > But

[web2py] Re: Strange request.vars behaviour [SOLVED]

2010-10-08 Thread iiijjjiii
mdipierro wrote: > because keyword appears both in get and in post. You can try: > > form=SQLFORM.factory( > Field('keyword', > default=keyword, > ) > _method="GET") > > or > form=SQLFORM.factory( >

[web2py] Fwd: [Chicago] From PMA - Position: Python Software Development

2010-10-08 Thread Massimo Di Pierro
Not web2py related but I thought some of you may be interested Begin forwarded message: > From: Brian Curtin > Date: October 8, 2010 8:54:53 AM CDT > To: Paul May , The Chicago Python Users Group > > Subject: Re: [Chicago] From PMA - Position: Python Software Development > Reply-To: The Chicag

[web2py] Offline apps

2010-10-08 Thread Fabio Alessandro Locati
Hi, I have a web app (actually running on GAE) but I would need it even in a offline state. I was thinking about installing web2py on the pc and putting the web2py app on it. This creates the problem of the database sync. Anyonee found this problem? nyone solved it? Thanks, Fabio

[web2py] Importing modules...

2010-10-08 Thread Jason Brower
It hsa been asked before but I am still trying to understand it. I have the mods for ampy a tool to let me use AMP network communication. I found all the modules I need in the ampy directory. Now I want to keep things organized so can I put the directory "ampy" with all it's modules in there? i

[web2py] Re: web2py error on windows

2010-10-08 Thread DenesL
Hi Jorge, which version are you using?. 1.86.3 worked fine for me. Denes On Oct 8, 5:38 am, Jorge Sousa wrote: > Hi, > > I'm trying this framework on windows but cannot startup due to the > following error. > > C:\tools\Python26\web2py>web2py.exe > Traceback (most recent call last): >   File "

Re: [web2py] error on compile

2010-10-08 Thread Raja sekhar
send the application program On Fri, Oct 8, 2010 at 3:34 PM, ceriox wrote: > hi all i have this error when i'm compiling my app > > Compilazione fallita: ci sono errori nell'applicazione. > > (filed to compile: there is errors in the application) > > i test the app but i don't find any error, wh

[web2py] web2py error on windows

2010-10-08 Thread Jorge Sousa
Hi, I'm trying this framework on windows but cannot startup due to the following error. C:\tools\Python26\web2py>web2py.exe Traceback (most recent call last): File "web2py.py", line 17, in File "gluon/widget.py", line 25, in File "gluon/main.py", line 44, in File "gluon/globals.py", li

[web2py] Re: Automatic delete of a record after x days

2010-10-08 Thread NetAdmin
# Add a datetime field to your model that saves current datetime db.define_table('mytable', Field('firstn', 'string', length=15), Field('fdate', 'datetime', default=request.now, requires= IS_NOT_EMPTY() ) ) db.tbtime5.firstn.requires=IS_NOT_EMPTY() db.tbtime5.fdate.requires=IS_NOT_EMPTY() #

[web2py] ATTENTION if crud.archive upload autodelete = False

2010-10-08 Thread selecta
I just wanted to make everybody aware that if you use crud.archive you must not set autodelte of upload fields to True since it will delete the files that are linked from the archive table

[web2py] error on compile

2010-10-08 Thread ceriox
hi all i have this error when i'm compiling my app Compilazione fallita: ci sono errori nell'applicazione. (filed to compile: there is errors in the application) i test the app but i don't find any error, where i can read the compiler log? (the error ticket of my app is empty)

[web2py] Re: f.y.i. pypy 1.3

2010-10-08 Thread cjrh
On Oct 7, 11:35 pm, mdipierro wrote: > yes but it has a memory leak because some files are not closed by > default. It can be fixed. Yes, of course. I expect that the same problem remains as reported in the original post. It is just that I didn't see such errors in my small tests last night.

Re: [web2py] Re: SyntaxError at line 2 on version 1.86.3

2010-10-08 Thread Mariano Reingart
Yes, it fixes the \n\r bug. That seems to be an issue only in windows with IE... The fix also calculates the offset (line and char) correctly. Regards, Mariano Reingart http://www.sistemasagiles.com.ar http://reingart.blogspot.com On Fri, Oct 8, 2010 at 1:18 AM, mdipierro wrote: > Can you c

Re: [web2py] Re: Session data lose...

2010-10-08 Thread Jason Brower
OK I ran your request and it looks like what I had suspected... LOTS of socket connects being made but none of them are closing. I think it's because I connected to the machine_server.py program I had made with twisted and the twisted instance it's closing. What are my solutions? I think the