[web2py] Google App Engine quota tips

2010-04-15 Thread Richard
http://blog.anekdotz.com/2010/04/squeezing-life-out-of-your-free-google.html -- To unsubscribe, reply using "remove me" as the subject.

[web2py] BUG in with_alias processing

2010-04-15 Thread Alexey Nezhdanov
Ok, I bumped into same problem again. But this time I actually DO use same table twice. So, the task: there is a table that MAY refer to itself. In my application monitors network tree for disconnections (is just pings hosts). Some alerts 'come out of the blue' and some are caused by these - i.e.

[web2py] r1812 breaks winservice.py

2010-04-15 Thread Fran
In Bzr revision 1813 onwards, Web2Py no longer works as a Win32 service: Traceback (most recent call last): File "C:\Bin\web2py\gluon\winservice.py", line 46, in SvcDoRun self.start() File "C:\Bin\web2py\gluon\winservice.py", line 118, in start path=options.folder, TypeError: __init__(

[web2py] Re: file uploads from legacy database

2010-04-15 Thread selecta
thanks Rowdy I was looking for exactly this kind of advice :) import glob for filename in glob.glob('/path/to/files/*'): db.yourtable.insert(yourfield=db.yourtable.yourfield.store(open(filename,'rb'))) writing my own download function would work but it would break future uploads which should be

[web2py] request.vars convenience

2010-04-15 Thread selecta
for request.args I can do request.args(0) and will return None if there is no such element, much nicer than request.args[0] if len(request.args)>0 else None I always wondered why this does not work for request.vars I have the following all over my code q = request.vars['q'] if request.vars.has

[web2py] How do I remove the last entry returned by Set.select() without deleting from the db table?

2010-04-15 Thread Carl
I'm building a ui that lists results to the user. if there are further results available a "More" button allows the user to retrieve them (and have them displayed beneath the existing results) To calculate if there are indeed more results available I am using limitby and requesting one more result

Re: [web2py] request.vars convenience

2010-04-15 Thread Mladen Milankovic
On Thursday, April 15, 2010 11:23:15 selecta wrote: > for request.args I can do > > request.args(0) > > and will return None if there is no such element, much nicer than > > request.args[0] if len(request.args)>0 else None > > I always wondered why this does not work for request.vars I have the

Re: [web2py] How do I remove the last entry returned by Set.select() without deleting from the db table?

2010-04-15 Thread Tiago Almeida
This might be completely wrong but did you try using the slice operator? like so: if len(rows) == max+1: #lose last row! #but how? results = self.build_results( *rows[:max] *) return results Sorry if it doesn't work. I can't try it now. Regards, Tiago Almeida On Thu, Apr 15, 2010 at 10:48

[web2py] Re: How do I remove the last entry returned by Set.select() without deleting from the db table?

2010-04-15 Thread Carl
thanks Tiago! Works flawlessly. I hadn't thought to drop the extra row on passing rows into build_results. (knew it was straightforward:) On Apr 15, 11:19 am, Tiago Almeida wrote: > This might be completely wrong but did you try using the slice operator? > like so: > > if len(rows) == max+1: >  

[web2py] Re: routes.py POST handling

2010-04-15 Thread Oatman
Thanks so much Massimo! I've seen that (.*) notation a lot around forums and maybe even this group (Not sure, as I came to the page via google and a group caching service). Is there a comprehensive and easy to read reference guide for routes.py? Based on my experience, it's difficult to get the rig

[web2py] Re: recaptcha in LOAD not working

2010-04-15 Thread selecta
I guess one of these linked libs will help to solve the problem http://ajaxpatterns.org/On-Demand_Javascript I am hitting this border more often now since I develop everything modular now and it is getting quite annoying On Apr 8, 3:02 pm, selecta wrote: > currently i'm quite buisy but i will se

[web2py] Self Reference or Null

2010-04-15 Thread Leandro - ProfessionalIT
Friends, I have a situation where I can have a dog that I don't know your father and mother. How to resolve this ? for example, a dog that I buy in a shop. db.define_table('dog', Field('name'), Field('father_id','reference dog'), Field('mother_id','reference dog')) How to map thi

Re: [web2py] Self Reference or Null

2010-04-15 Thread Alexey Nezhdanov
Question not clear. What does mean 'map' here? On Thu, Apr 15, 2010 at 4:45 PM, Leandro - ProfessionalIT < lsever...@gmail.com> wrote: > Friends, > > I have a situation where I can have a dog that I don't know your > father and mother. How to resolve this ? for example, a dog that I buy > in a

[web2py] Re: Custom Auth Methods

2010-04-15 Thread Ishbir
I couldn't get it working.. So in the end, I've decided to ditch web2py coz it does lot of 'magic'; there's not much stuff left to the developer. It's noob friendly but not for the average developer. I've decided to go on with Pylons + Mako + SQLAlchemy + Authkit and they very little magic. On Apr

[web2py] Re: BUG in with_alias processing

2010-04-15 Thread mdipierro
Alias was not designed to let you rename tables in arbitrary cases. It was designed to prevent naming conflicts when you left join the same table multiple times. It works in this second case. So this should work db(db.TEST.id>0). select(TEST.ALL, b.id.count(),left=b.on(b.top_id==TEST.id)) I agree

Re: [web2py] Re: DAL SQL exercise of the day

2010-04-15 Thread Kuba Kucharski
I don't think so, please post :) -- Kuba On Thu, Apr 15, 2010 at 4:49 AM, DenesL wrote: > Nobody else? Need more time? > Speak up or else... I will will post the answer. > > > -- > To unsubscribe, reply using "remove me" as the subject. >

[web2py] Re: request.vars convenience

2010-04-15 Thread mdipierro
You can do: q = request.vars.q or None On Apr 15, 5:05 am, Mladen Milankovic wrote: > On Thursday, April 15, 2010 11:23:15 selecta wrote: > > for request.args I can do > > > request.args(0) > > > and will return None if there is no such element, much nicer than > > > request.args[0] if len(reque

[web2py] Re: routes.py POST handling

2010-04-15 Thread mdipierro
there is a section in the book. I agree, it needs to be expanded. On Apr 15, 6:14 am, Oatman wrote: > Thanks so much Massimo! I've seen that (.*) notation a lot around > forums and maybe even this group (Not sure, as I came to the page via > google and a group caching service). > Is there a compr

[web2py] Re: Custom Auth Methods

2010-04-15 Thread mdipierro
OK. If you want more support debugging anyway, let us know. You will be always be welcome back. On Apr 15, 7:57 am, Ishbir wrote: > I couldn't get it working.. So in the end, I've decided to ditch > web2py coz it does lot of 'magic'; there's not much stuff left to the > developer. It's noob frien

[web2py] Re: r1812 breaks winservice.py

2010-04-15 Thread mdipierro
I think it is not fixed. Please check. Thanks. On Apr 15, 3:13 am, Fran wrote: > In Bzr revision 1813 onwards, Web2Py no longer works as a Win32 > service: > > Traceback (most recent call last): >   File "C:\Bin\web2py\gluon\winservice.py", line 46, in SvcDoRun >     self.start() >   File "C:\Bin

[web2py] Re: routes.py POST handling

2010-04-15 Thread Oatman
Works! Thanks :-) On Apr 15, 2:47 pm, mdipierro wrote: > there is a section in the book. I agree, it needs to be expanded. > > On Apr 15, 6:14 am, Oatman wrote: > > > > > Thanks so much Massimo! I've seen that (.*) notation a lot around > > forums and maybe even this group (Not sure, as I came t

Re: [web2py] request.vars convenience

2010-04-15 Thread Jonathan Lundell
On Apr 15, 2010, at 3:05 AM, Mladen Milankovic wrote: > q = request.vars.get('q', None) > > You can put anything instead of None. It's like a default value. Or just q = request.vars.get('q'), since None is the default. This is standard dictionary behavior in Python. It and setdefault are parti

Re: [web2py] Re: r1812 breaks winservice.py

2010-04-15 Thread Jonathan Lundell
On Apr 15, 2010, at 6:50 AM, mdipierro wrote: > I think it is not fixed. Please check. Thanks. Or "now fixed", as the case may be. > > On Apr 15, 3:13 am, Fran wrote: >> In Bzr revision 1813 onwards, Web2Py no longer works as a Win32 >> service: >> >> Traceback (most recent call last): >> F

[web2py] web2py+pyjamas (TypeError again)

2010-04-15 Thread The Czar
I am working to become familiar with both web2py & pyjamas. I implemented the example todo application and receive exactly the same error that Nicolás de la Torre reported on 06/07/09. I am using Current Version 1.76.5 and pyjamas 0.5p. I also used the web2py built- in web server (not apache) and r

[web2py] Plugin Attachments & mmodal

2010-04-15 Thread toan75
Hi all, I love this plugin: http://web2py.com/plugins/default/attachments How i can change for this plugin display in the button on my page (instead of the button at the bottom-right corner of the browser)? Otherwise, i can pass a callback same attachment function in PluginMModal? (modal windows

[web2py] Re: r1812 breaks winservice.py

2010-04-15 Thread Fran
On Apr 15, 4:15 pm, Jonathan Lundell wrote: > On Apr 15, 2010, at 6:50 AM, mdipierro wrote: > > I think it is not fixed. Please check. Thanks. > Or "now fixed", as the case may be. Indeed seems to be - thanks for the speedy response :) F -- To unsubscribe, reply using "remove me" as the subje

[web2py] Documentation on setting up web2py and Google App Engine (GAE) in a windows XP environment.

2010-04-15 Thread Yanni
Ok, so here's are the concise steps I took, to get my test web2py application "pets" on Google App engine. 1. Downloaded the Windows XP compiled windows version: http://www.web2py.com/examples/default/download 2. Started the web2py server, web2py.exe 3. Followed a demo to create a sample pets123 a

[web2py] Re: Self Reference or Null

2010-04-15 Thread Leandro - ProfessionalIT
Hi Alexey, sorry, map = define table in models.py. -- Leandro. -- To unsubscribe, reply using "remove me" as the subject.

[web2py] Re: web2py+pyjamas (TypeError again)

2010-04-15 Thread mdipierro
It is a client problem. It appears to be passing multiple instances of the "method" field in the request.body. I think there are some Pyjamas folks here. Perhaps they can explain why happens and whether it is a bug or if web2py should support this. On Apr 15, 10:08 am, The Czar wrote: > I am work

[web2py] Re: Plugin Attachments & mmodal

2010-04-15 Thread mdipierro
The location of the button is in html generated by models/ plugin_attachments.py you can edit it. The plugin should eventually be made more customizable. On Apr 15, 11:23 am, toan75 wrote: > Hi all, > > I love this plugin:http://web2py.com/plugins/default/attachments > How i can change for this

[web2py] Re: Documentation on setting up web2py and Google App Engine (GAE) in a windows XP environment.

2010-04-15 Thread mdipierro
On Apr 15, 11:29 am, Yanni wrote: > Ok, so here's are the concise steps I took, to get my test web2py > application "pets" on Google App engine. > > 1. Downloaded the Windows XP compiled windows > version:http://www.web2py.com/examples/default/download > 2. Started the web2py server, web2py.exe

[web2py] How to return the resources?

2010-04-15 Thread aabelyakov
During my application error occurs and it stops giving error ticket. How can I in my application to return the resources of the operating system (eg close the COM port) before the error ticket not to restart the web server? Excuse my bad English... Regards -- To unsubscribe, reply using "rem

[web2py] Re: Documentation on setting up web2py and Google App Engine (GAE) in a windows XP environment.

2010-04-15 Thread Yanni
Thank you. Is there a version control system that you can recommend, or that integrates well with web2py? On Apr 15, 10:06 am, mdipierro wrote: > On Apr 15, 11:29 am, Yanni wrote: > > > > > Ok, so here's are the concise steps I took, to get my test web2py > > application "pets" on Google App

Re: [web2py] Re: Documentation on setting up web2py and Google App Engine (GAE) in a windows XP environment.

2010-04-15 Thread Thadeus Burgess
Mercurial -- Thadeus On Thu, Apr 15, 2010 at 12:27 PM, Yanni wrote: > Thank you. > > Is there a version control system that you can recommend, or that > integrates well with web2py? > > > > > On Apr 15, 10:06 am, mdipierro wrote: >> On Apr 15, 11:29 am, Yanni wrote: >> >> >> >> > Ok, so he

[web2py] Re: How to return the resources?

2010-04-15 Thread mdipierro
Do you use os.chdir or explicit calls to the thread module in your code? On Apr 15, 12:15 pm, aabelyakov wrote: > During my application error occurs and it stops giving error ticket. > > How can I in my application to return the resources of the operating > system > (eg close the COM port)  befor

[web2py] sqlite and 'unique'

2010-04-15 Thread Keith Edmunds
I have the following (sqlite) table definition: db.define_table('companies', Field('name', length=512, default='', unique=True), Field('oncontract', 'boolean', default=False) ) >From the admin app, I am prevented from adding duplicate company names. However, from the shell, a sequence of:

Re: [web2py] sqlite and 'unique'

2010-04-15 Thread Thadeus Burgess
sqlite does not enforce types/length, or uniqueness. You can insert a string into an integer field for all sqlite is concerned. -- Thadeus On Thu, Apr 15, 2010 at 3:17 PM, Keith Edmunds wrote: > I have the following (sqlite) table definition: > > db.define_table('companies', >    Field('nam

Re: [web2py] sqlite and 'unique'

2010-04-15 Thread Keith Edmunds
On Thu, 15 Apr 2010 15:25:56 -0500, thade...@thadeusb.com said: > sqlite does not enforce types/length, or uniqueness. I understand about types/lengths, but the uniqueness part doesn't match with what I'm seeing: $ sqlite3 /dev/shm/test.db SQLite version 3.5.9 Enter ".help" for instructions sqli

[web2py] Re: sqlite and 'unique'

2010-04-15 Thread mdipierro
Is it possible you did not have unique=True when you created the table and added that later? sqlite does not support alter table with changing of column attributes. On Apr 15, 3:41 pm, Keith Edmunds wrote: > On Thu, 15 Apr 2010 15:25:56 -0500, thade...@thadeusb.com said: > > > sqlite does not enf

Re: [web2py] Re: sqlite and 'unique'

2010-04-15 Thread Keith Edmunds
On Thu, 15 Apr 2010 13:56:19 -0700 (PDT), mdipie...@cs.depaul.edu said: > Is it possible you did not have unique=True when you created the table > and added that later? Yes, that is the case - thanks for clearing that up, much appreciated. Keith -- To unsubscribe, reply using "remove me" as t

[web2py] group permissions

2010-04-15 Thread Marc Dojka
Is it possible to have a group be a member of another group for cascading permissions? For example, groupA is a member of groupB; groupA would have all of groupB's permissions plus any unique to groupA. Let me know. thanks. -- To unsubscribe, reply using "remove me" as the subject.

[web2py] Re: group permissions

2010-04-15 Thread mdipierro
not in current auth. Would be difficult to manage I think. On Apr 15, 4:19 pm, Marc Dojka wrote: > Is it possible to have a group be a member of another group for > cascading permissions?  For example, groupA is a member of groupB; > groupA would have all of groupB's permissions plus any unique t

[web2py] Re: GAE Import Ticket

2010-04-15 Thread Chris S
Thanks for the heads up. I switched to memcache as suggested and it's exactly what I wanted. No automatically growing tables, and error tickets are indeed still stored by google which is the only place I ever access them anyway. On Apr 14, 4:34 pm, howesc wrote: > i went through this in GAE a

[web2py] Re: group permissions

2010-04-15 Thread Marc Dojka
Thanks. I kind of that it wasn't possible. I'll have to figure out a work around for it. Manage as in technically challenging or as in the admin time of keeping things straight? On Apr 15, 5:46 pm, mdipierro wrote: > not in current auth. Would be difficult to manage I think. > > On Apr 15, 4:1

[web2py] Re: sqlite and 'unique'

2010-04-15 Thread mdipierro
Try on a fresh database it should work. On Apr 15, 4:01 pm, Keith Edmunds wrote: > On Thu, 15 Apr 2010 13:56:19 -0700 (PDT), mdipie...@cs.depaul.edu said: > > > Is it possible you did not have unique=True when you created the table > > and added that later? > > Yes, that is the case - thanks for

Re: [web2py] Re: sqlite and 'unique'

2010-04-15 Thread Keith Edmunds
On Thu, 15 Apr 2010 15:06:57 -0700 (PDT), mdipie...@cs.depaul.edu said: > Try on a fresh database it should work. I have, it did, thank you again. Perhaps a note in the V3 book about this? Keith -- Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en

[web2py] Re: DAL SQL exercise of the day

2010-04-15 Thread DenesL
Time to reveal the solution. Lets start with the simple table definitions: db.define_table('person', Field('name'), ) db.define_table('dog', Field('name'), Field('owner', 'reference person'), ) which creates a one-to-many relation, since a person can own many dogs. To illustrate what goes

Re: [web2py] Re: Self Reference or Null

2010-04-15 Thread Alexey Nezhdanov
Hmm. Model looks ok. Why? On Thu, Apr 15, 2010 at 8:35 PM, Leandro - ProfessionalIT < lsever...@gmail.com> wrote: > Hi Alexey, > > sorry, map = define table in models.py. > > -- Leandro. > > > -- > To unsubscribe, reply using "remove me" as the subject. >

[web2py] Re: web2py+pyjamas (TypeError again)

2010-04-15 Thread The Czar
Please do not invest any more time investigating this problem further. The pyjamas install that I originally used was from the FreeBSD ports collection. I downloaded the pyjamas 05p1 directly and set it up in a 'sandbox'. I recreated the output using the sandbox pyjsbuild and it works correctly wit

[web2py] NameError: global name 'formstyle' is not defined

2010-04-15 Thread aabelyakov
Version 1.76.5 (2010-03-20 12:12:17) web2py source code from trunk File "D:\MyProg\_MyPython\Web2py\gluon\sqlhtml.py", line 799, in __init__ if formstyle == 'table3cols': NameError: global name 'formstyle' is not defined -- Subscription settings: http://groups.google.com/group/web2py/subsc

Re: [web2py] Re: BUG in with_alias processing

2010-04-15 Thread Alexey Nezhdanov
Oh, Massimo, actually I was wrong here again. Sorry for second time reporting same issue while still not being a bug. However, I still catched one, related specifically to Oracle. As it happened, using LEFT JOIN here is more correct as I need empty groups too. But Oracle chockes with error ORA-0090

[web2py] Re: [web2py:37718] Re: Web2py and MongoDB

2010-04-15 Thread David Mitchell
Bump - is there any new news on adding MongoDB (or CouchDB) support to web2py? Massimo hinted that it might appear in mid-late February earlier in this thread, but if there's been any more announcements since then I've missed them. (That's the downside of an active mailing list; there's so many t

[web2py] Re: web2py+pyjamas (TypeError again)

2010-04-15 Thread mdipierro
thanks for letting us know. On Apr 16, 12:49 am, The Czar wrote: > Please do not invest any more time investigating this problem further. > The pyjamas install that I originally used was from the FreeBSD ports > collection. I downloaded the pyjamas 05p1 directly and set it up in a > 'sandbox'. I

[web2py] Re: NameError: global name 'formstyle' is not defined

2010-04-15 Thread mdipierro
In the version in trunk that line is 768 and not 977 and it is defined. It is an argument of the function. Your file appear longer than it should be and that is very odd. Please try download it again. On Apr 16, 1:01 am, aabelyakov wrote: > Version 1.76.5 (2010-03-20 12:12:17) > web2py source co

[web2py] Re: BUG in with_alias processing

2010-04-15 Thread mdipierro
No problem. Better report and check that not check and leave a bug in there. Can you explain the fix below? Oracle does not understand AS? Is there documentation about this somewhere I can reference as a comment to the fix? Massimo On Apr 16, 1:11 am, Alexey Nezhdanov wrote: > Oh, Massimo, actu

[web2py] Re: [web2py:37718] Re: Web2py and MongoDB

2010-04-15 Thread mdipierro
Sorry. Things have been moving slow on this topic. On Apr 16, 1:18 am, David Mitchell wrote: > Bump - is there any new news on adding MongoDB (or CouchDB) support to > web2py? > > Massimo hinted that it might appear in mid-late February earlier in this > thread, but if there's been any more annou