[web2py] Re: Trouble adding lxml module to application

2012-08-13 Thread pbreit
Web2py runs fine (better?) on 2.6 and 2.7. --

[web2py] Re: Trouble adding lxml module to application

2012-08-13 Thread Mike Girard
Are you sure? I searched on this list and seemed that there had been some problems. In light of this I installed lxml in my 2.5 site-packages and ran web2py with the python2.5 command recommended on the installation page. Can someone confirm what Python version is best for running web2py as of

Re: [web2py] Init Script in Web2Py

2012-08-13 Thread Mandar Vaze
You can put something like that in models somewhere. Putting this in models directory will make it execute every single time. I suggest you put it in a separate scripts folder (which is what I have done) and execute it when you need it using : python web2py.py -S appname -M -R

Re: [web2py] Connecting with database that has tables in it

2012-08-13 Thread hasan alnator
Dear ALL , So i can use sql server without defining tables , and if i want to use it , after i make the connection string i can use db.executesql(RAW SQL) ?? is that true ?? best regards, On Mon, Aug 13, 2012 at 4:16 AM, pbreit pbreitenb...@gmail.com wrote: In order to use DAL query

[web2py] Re: DAL belongs() fails on App Engine

2012-08-13 Thread howesc
we do special query handling on the key field, so i suspect the multiple filters on key is wonky. i'll try and look at this in the next couple of days thanks for reporting, and thanks for your patience guiding us through it. :) christian On Sunday, August 12, 2012 8:01:29 PM UTC-7,

[web2py] Re: KeyError: 'name' when inserting/updating via appadmin

2012-08-13 Thread Mandar Vaze
Done. http://code.google.com/p/web2py/issues/detail?id=931 -Mandar On Saturday, August 11, 2012 2:58:57 AM UTC+5:30, Massimo Di Pierro wrote: Can you please open a ticket? On Wednesday, 8 August 2012 12:08:53 UTC-5, Mandar Vaze wrote: I'm using web2py version : Version 2.0.0 (2012-07-26

[web2py] how to use Not belongs

2012-08-13 Thread Pradeesh
In my control I have an array with so many values. I want to write a dal query to update a table rows which having ID not in this array. I want something like this. db(db.table1.field1.notbelongs(array)).update(field2=False) I have tried like this db(db.table1.field1 not

Re: [web2py] web2py 2.0 almost done

2012-08-13 Thread Marin Pranjić
Installing new app in admin via URL is not working for me (trunk) On Tue, Aug 7, 2012 at 6:33 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Web2py 2.0 is almost done. Please try the nightly build. Let us know if it breaks anything. massimo -- --

[web2py] Re: GAE SDK: Getting ImportError for gluon.contrib.populate import populate

2012-08-13 Thread Jaymin Oh
I just found by myself. populate method in db.py doesn't support in GAE. On Thursday, September 29, 2011 6:52:16 PM UTC+9, glomde wrote: Hi, I am trying to use GAE but I get import error on populate in db_wizard_populate.py. It seems to do with the restricted environment. Do anybody

[web2py] Re: how to use Not belongs

2012-08-13 Thread lyn2py
I can't test it here, but did you use db.table1.field2 instead of field2 ? On Monday, August 13, 2012 4:21:28 PM UTC+8, Pradeesh wrote: In my control I have an array with so many values. I want to write a dal query to update a table rows which having ID not in this array. I want

Re: [web2py] how to use Not belongs

2012-08-13 Thread Bruno Rocha
use the unary ~ operator db(~db.table1.field1.belongs(array)).update(field2=False) Bruno Rocha www.rochacbruno.com.br Em 13/08/2012 05:21, Pradeesh pradeeshnara...@gmail.com escreveu: In my control I have an array with so many values. I want to write a dal query to update a table rows which

Re: [web2py] Connecting with database that has tables in it

2012-08-13 Thread Khalil KHAMLICHI
right, but you will miss the beauty of the DAL. try creating the tables, it takes only a few minutes. On Mon, Aug 13, 2012 at 7:15 AM, hasan alnator halna...@gardeniatelco.comwrote: Dear ALL , So i can use sql server without defining tables , and if i want to use it , after i make the

Re: [web2py] Connecting with database that has tables in it

2012-08-13 Thread hasan alnator
you mean to redefine the tables in the dal like they are in the database ? On Mon, Aug 13, 2012 at 2:43 PM, Khalil KHAMLICHI khamlichi.kha...@gmail.com wrote: right, but you will miss the beauty of the DAL. try creating the tables, it takes only a few minutes. On Mon, Aug 13, 2012 at

Re: [web2py] Re: Appengine CPU cycles

2012-08-13 Thread Khalil KHAMLICHI
I know, when I wrote that, I only meant to express my hope that this subject be included in web2py's roadmap. cloud hosting is the future and cpu cycles are its units for payment, web2py is so beautiful to work with, let's let this beauty fly to the clouds. On Mon, Aug 13, 2012 at 1:41 AM,

Re: [web2py] how to use Not belongs

2012-08-13 Thread Cliff Kachinske
Bruno's method is correct. With Postgres and psycopg2, make sure the array variable is not empty or wrap it in a try...except block. On Monday, August 13, 2012 7:34:55 AM UTC-4, rochacbruno wrote: use the unary ~ operator db(~db.table1.field1.belongs(array)).update(field2=False) Bruno

[web2py] howto subset a select element

2012-08-13 Thread lucas
hello one and all, lets say i have a model like: db.define_table('courses', Field('user_id', db.auth_user, requires=IS_IN_DB(db, '%s.id' % db.auth_user, '%(last_name)s, %(first_name)s (%(id)s)')), db.define_table('classes', Field('course_id', db.courses, requires=IS_IN_DB(db,

[web2py] Re: howto subset a select element

2012-08-13 Thread Anthony
The first argument to IS_IN_DB and IS_NOT_IN_DB can be a Set object rather than the entire db: IS_IN_DB(db(db.courses.teacher = auth.user_id), db.courses.id, '%(title)s (%(id)s)') See http://web2py.com/books/default/chapter/29/7#Database-validators. Anthony On Monday, August 13, 2012 8:21:44

[web2py] Re: Trouble adding lxml module to application

2012-08-13 Thread Anthony
Are you sure? I searched on this list and seemed that there had been some problems. Shouldn't be any problems. 2.5 is the *oldest* version of Python with which web2py will work (used to be 2.4), but it works fine with 2.6 and 2.7. Anthony --

Re: [web2py] Re: Appengine CPU cycles

2012-08-13 Thread Anthony
I know, when I wrote that, I only meant to express my hope that this subject be included in web2py's roadmap. OK, that sounds more reasonable than I could clearly see that web2py was too heavy to be profitable on gae. :-) So, we already have conditional models as well as the option to

[web2py] default tab key behavior change in fields

2012-08-13 Thread max
I want to add the enter key instead of tab keys to the forms. is it possible to intergrate into web2py. --

Re: [web2py] Connecting with database that has tables in it

2012-08-13 Thread Anthony
On Monday, August 13, 2012 7:47:52 AM UTC-4, Hassan Alnatour wrote: you mean to redefine the tables in the dal like they are in the database ? Yes, in order to use the DAL with a database, the DAL needs to know what's in the database, which is the purpose of the table definitions. As

[web2py] Re: Trouble adding lxml module to application

2012-08-13 Thread Mike Girard
Thanks for the confirmation. Perhaps the official documentation should be updated. On Monday, August 13, 2012 9:17:51 AM UTC-4, Anthony wrote: Are you sure? I searched on this list and seemed that there had been some problems. Shouldn't be any problems. 2.5 is the *oldest* version of

[web2py] Re: default tab key behavior change in fields

2012-08-13 Thread Anthony
On Monday, August 13, 2012 9:24:13 AM UTC-4, max wrote: I want to add the enter key instead of tab keys to the forms. is it possible to intergrate into web2py. Sure, but this has to be handled on the client side via Javascript. Here's one solution:

[web2py] Re: Trouble adding lxml module to application

2012-08-13 Thread Anthony
The book says: web2py runs with CPython (the C implementation) and Jython (the Java implementation), on Python versions 2.4, 2.5, 2.6, and 2.7, although officially it only supports 2.5 so that we can guarantee backward compatibility for applications. I guess that sounds a bit misleading, as

[web2py] Re: default tab key behavior change in fields

2012-08-13 Thread max
thank anthony. Am Montag, 13. August 2012 15:30:24 UTC+2 schrieb Anthony: On Monday, August 13, 2012 9:24:13 AM UTC-4, max wrote: I want to add the enter key instead of tab keys to the forms. is it possible to intergrate into web2py. Sure, but this has to be handled on the client side via

[web2py] Re: howto subset a select element

2012-08-13 Thread lucas
oh my, that is so perfect, i love that. i learned a new word and i am going to use it everywhere. thanx anthony. p.s. hey, when is web2py v2.0 going to be stable and released full? doesn't it have angularjs built into it also? --

[web2py] enter a 'comma' instead of dot for floating point numbers.

2012-08-13 Thread max
One of my users use german keyboard. is there any possibility for the dot in a floating point number identified as comma. for me global replacing is also o.k. Example: 1223.12 as 122,23 for all the values in forms. --

Re: [web2py] enter a 'comma' instead of dot for floating point numbers.

2012-08-13 Thread Bruno Rocha
take a look on custom validators http://rochacbruno.com.br/custom-validator-for-web2py-forms/ Em 13/08/2012 10:54, max dulip.withan...@gmail.com escreveu: One of my users use german keyboard. is there any possibility for the dot in a floating point number identified as comma. for me global

[web2py] Re: howto subset a select element

2012-08-13 Thread Anthony
p.s. hey, when is web2py v2.0 going to be stable and released full? I think very soon, not sure exactly when. doesn't it have angularjs built into it also? No, where did you hear that? Anthony --

Re: [web2py] enter a 'comma' instead of dot for floating point numbers.

2012-08-13 Thread max
thank a lot. helps me to do what i want. Am Montag, 13. August 2012 16:00:17 UTC+2 schrieb rochacbruno: take a look on custom validators http://rochacbruno.com.br/custom-validator-for-web2py-forms/ Em 13/08/2012 10:54, max dulip.w...@gmail.com javascript: escreveu: One of my users use

[web2py] Fw: Need CRM Administrator (Sales force)

2012-08-13 Thread Lokesh (Sriven Infosys,Inc)
Hi Folks, Hope you are doing great. Please let me know if you have any consultant for the following requirement. Please forward the resumes lok...@sriveninfosys.net CRM Administrator (Sales force) 1 Year Austin, TX Job Specific Job Specific Required education experience ·

[web2py] Re: enter a 'comma' instead of dot for floating point numbers.

2012-08-13 Thread Anthony
Have you tried IS_DECIMAL_IN_RANGE(dot=T(','))? Also works for IS_FLOAT_IN_RANGE(). Anthony On Monday, August 13, 2012 9:54:27 AM UTC-4, max wrote: One of my users use german keyboard. is there any possibility for the dot in a floating point number identified as comma. for me global

Re: [web2py] web2py 2.0 almost done

2012-08-13 Thread Massimo Di Pierro
Can you help looking into it? On Monday, 13 August 2012 05:32:20 UTC-5, Marin Pranjić wrote: Installing new app in admin via URL is not working for me (trunk) On Tue, Aug 7, 2012 at 6:33 AM, Massimo Di Pierro massimo@gmail.comjavascript: wrote: Web2py 2.0 is almost done. Please

[web2py] Re: Trouble adding lxml module to application

2012-08-13 Thread Massimo Di Pierro
The problem is what we mean by support. If somebody writes and app using 2.7 syntax, it works but the app will not work on a different web2py installation running 2.5. I agree we should clarify web2py runs on 2.6 and 2.6 but we should also discourage from using methods and syntax not supported

[web2py] Re: howto subset a select element

2012-08-13 Thread Massimo Di Pierro
I was hoping last week. Not I am hoping next week. We have closed most of the tickets we think were important but there are a couple more to deal with. On Monday, 13 August 2012 09:00:48 UTC-5, Anthony wrote: p.s. hey, when is web2py v2.0 going to be stable and released full? I think

[web2py] Re: Trouble adding lxml module to application

2012-08-13 Thread Mike Girard
The book also provides this command for running web2py from source. python2.5 web2py.py it was this that made me think I had to use 2.5 along with presumably obsolete posts in this group about issues that came up with new Python versions. I suppose if I hadn't been skimming, I would have felt

Re: [web2py] web2py 2.0 almost done

2012-08-13 Thread Marin Pranjić
Sure. There is no upload logic for URLs. It was removed with this revision: http://code.google.com/p/web2py/source/diff?spec=svn33970ff5ac8470c8003290671a1352c29ec00e25r=33970ff5ac8470c8003290671a1352c29ec00e25format=sidepath=/applications/admin/controllers/default.py Application is retreived

Re: [web2py] web2py 2.0 almost done

2012-08-13 Thread Massimo Di Pierro
ouch! sorry about that. On Monday, 13 August 2012 09:46:51 UTC-5, Marin Pranjić wrote: Sure. There is no upload logic for URLs. It was removed with this revision:

[web2py] Re: Enforcing - like gmail: first character of your username should be a letter (a-z) or number.

2012-08-13 Thread Rob_McC
Anthony: Thanks for continued help. I greated a new simple app, inserted the two line, where I hope they should go. (in bold, below is entire source) This is the only thing chaned in the simple app. *I Get The Same error:*type 'exceptions.AttributeError' 'tuple' object has no attribute

[web2py] Re: Trouble adding lxml module to application

2012-08-13 Thread Anthony
Yes, I think that should be clarified as well. Thanks. Anthony On Monday, August 13, 2012 10:38:40 AM UTC-4, Mike Girard wrote: The book also provides this command for running web2py from source. python2.5 web2py.py it was this that made me think I had to use 2.5 along with presumably

[web2py] Re: LinkedIn Integration - my step by step tutorial

2012-08-13 Thread Carl
Can anyone recommend this code over that in contrib /login_methods/linkedin_account.py ? On Wednesday, 4 April 2012 06:49:46 UTC+1, Udi Milo wrote: It took a while to figure out, but this is my version on how to use linkedIn in web2py, comments are much appreciated. (its very detailed and

[web2py] Re: Trouble adding lxml module to application

2012-08-13 Thread Anthony
On Monday, August 13, 2012 10:34:55 AM UTC-4, Massimo Di Pierro wrote: The problem is what we mean by support. If somebody writes and app using 2.7 syntax, it works but the app will not work on a different web2py installation running 2.5. I agree we should clarify web2py runs on 2.6 and

[web2py] Re: Enforcing - like gmail: first character of your username should be a letter (a-z) or number.

2012-08-13 Thread Anthony
Hmm, can you try with trunk? I just tried the same thing with trunk and don't get any error. Anthony On Monday, August 13, 2012 11:00:21 AM UTC-4, Rob_McC wrote: Anthony: Thanks for continued help. I greated a new simple app, inserted the two line, where I hope they should go. (in bold,

[web2py] Re: Enforcing - like gmail: first character of your username should be a letter (a-z) or number.

2012-08-13 Thread Anthony
Just looked at the 1.99.7 code, and it is a tuple there -- but it has been changed to a list in trunk, so should work in the upcoming 2.0 release. Anthony On Monday, August 13, 2012 11:16:07 AM UTC-4, Anthony wrote: Hmm, can you try with trunk? I just tried the same thing with trunk and

[web2py] How to get started with web2py's Debug? - very basic questions

2012-08-13 Thread Rob_McC
I have used debuggers before, and I want to use web2py debug feature. 1. I create a new simple app, 2. bring up db.py file 3. go to line 10, press *[toggle breakpoint]* button 4. get this error Set Breakpoint on

Re: [web2py] Re: Enforcing - like gmail: first character of your username should be a letter (a-z) or number.

2012-08-13 Thread Jonathan Lundell
In any case, while tuples are immutable, they can be concatenated and replaced. Just don't use insert or append. On Aug 13, 2012, at 8:19 AM, Anthony abasta...@gmail.com wrote: Just looked at the 1.99.7 code, and it is a tuple there -- but it has been changed to a list in trunk, so should

Re: [web2py] Re: GAE Cloud SQL local dev server problem

2012-08-13 Thread Alexei Vinidiktov
It gives me the error: self.folder = thread.folder.split('/applications/',1)[1] IndexError: list index out of range Full traceback: ERROR2012-08-13 15:36:00,799 dal.py:6586] DEBUG: connect attempt 0, connection error: Traceback (most recent call last): File

Re: [web2py] Re: GAE Cloud SQL local dev server problem

2012-08-13 Thread Massimo Di Pierro
any way you can log what is in thread.folder? On Monday, 13 August 2012 10:38:48 UTC-5, Alexei Vinidiktov wrote: It gives me the error: self.folder = thread.folder.split('/applications/',1)[1] IndexError: list index out of range Full traceback: ERROR2012-08-13 15:36:00,799

Re: [web2py] Re: GAE Cloud SQL local dev server problem

2012-08-13 Thread Alexei Vinidiktov
The contents of thread.folder: C:\Users\alexei\Dev\web2py\ web2py.googlecode.com\applications\vocabilis\databases On Mon, Aug 13, 2012 at 11:11 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: any way you can log what is in thread.folder? On Monday, 13 August 2012 10:38:48 UTC-5,

[web2py] Re: How to get started with web2py's Debug? - very basic questions

2012-08-13 Thread Anthony
Does the problem exist in trunk? If so, maybe submit an issue -- looks like a bug. Anthon On Monday, August 13, 2012 11:31:31 AM UTC-4, Rob_McC wrote: I have used debuggers before, and I want to use web2py debug feature. 1. I create a new simple app, 2. bring up db.py file 3.

Re: [web2py] Re: GAE Cloud SQL local dev server problem

2012-08-13 Thread Jonathan Lundell
Change '/applications/' to os.sep + 'applications' + os.sep On Aug 13, 2012, at 10:40 AM, Alexei Vinidiktov alexei.vinidik...@gmail.com wrote: The contents of thread.folder: C:\Users\alexei\Dev\web2py\web2py.googlecode.com\applications\vocabilis\databases On Mon, Aug 13, 2012 at 11:11

[web2py] Re: How to get started with web2py's Debug? - very basic questions

2012-08-13 Thread Massimo Di Pierro
Do you have this file: /Users/robsss/Documents/signaturr_web2py_1_99/web2py/ web2py.app/Contents/Resources/applications/RAM_Simple_Insert/models/db.py On Monday, 13 August 2012 10:31:31 UTC-5, Rob_McC wrote: I have used debuggers before, and I want to use web2py debug feature. 1. I

Re: [web2py] Re: GAE Cloud SQL local dev server problem

2012-08-13 Thread Massimo Di Pierro
Ok. this is in trunk. Still need testing, there may be other issues. The $HOME in that line assumes this is running on GAE (or linux) and not on Windows. On Monday, 13 August 2012 13:10:03 UTC-5, Jonathan Lundell wrote: Change '/applications/' to os.sep + 'applications' + os.sep On Aug 13,

[web2py] Re: autoincremente field with a specific first value

2012-08-13 Thread Cliff Kachinske
In MySQL there is ALTER TABLE mytable AUTO_INCREMENT = 500 Is that what you want to do? On Friday, August 10, 2012 11:46:54 AM UTC-4, tigmmi wrote: Is there a way to add an autoincremente field with a specific first value. Compute won't work with id + number. --

[web2py] Re: How to get started with web2py's Debug? - very basic questions

2012-08-13 Thread Anthony
It sounds like he actually opened that file in the admin editor and hit the toggle breakpoint button, which yielded the error. On Monday, August 13, 2012 2:27:42 PM UTC-4, Massimo Di Pierro wrote: Do you have this file: /Users/robsss/Documents/signaturr_web2py_1_99/web2py/

[web2py] Re: How to get started with web2py's Debug? - very basic questions

2012-08-13 Thread Rob_McC
Q: Do you have this file? A: . Sure, it is just the default file when I created the simple app to learn how to use debug- Here it is, also *attached*. Thanks for looking at this. R # -*- coding: utf-8 -*- # this file is released under public domain and you can use without limitations

[web2py] Re: NoSQL Question Again!!!

2012-08-13 Thread Pystar
how do we test it. I am interested in doing that On Monday, August 13, 2012 5:08:04 AM UTC+1, Massimo Di Pierro wrote: We think web2py supports mongo well but we need more people to help testing it. We will mention in the 2.0 release as experimental because of lack of testers. On

Re: [web2py] retrieve data from many to many relation

2012-08-13 Thread Mike Girard
I am sure that this answer is exactly what I am looking for to solve a problem I am having. However, I don't quite understand the particulars. Vincenzo, could you please provide an example of the queries used here to get the movie linked up with the genre. Maybe some code? On Saturday, July

[web2py] Re: CAS Auth redirect loop

2012-08-13 Thread H. Das
I have the same problem too. I'm using custom auth_user table, as well as a custom decorator. After a new user registration, the browser returns a 310 error. I have to remove this custom decorator from *every *controller function for the problem to disappear during new registrations. This is

[web2py] Re: Enforcing - like gmail: first character of your username should be a letter (a-z) or number.

2012-08-13 Thread Rob_McC
Just tried with web2py *2.0* release. It *worked* . auth.define_tables(username=True) db.auth_user.username.requires.insert(0,IS_MATCH([a-z].*)) So, thanks everyone, this certainly answered my first post about the error. I'll posts my working username code, that behaves the way Google usernames

[web2py] Re: Scheduler: help us test it while learning

2012-08-13 Thread Niphlod
Ok, done (the save output for TIMEOUTted tasks). Small issue, but quite manageable: when a task timeouts the output now is saved, and you have the traceback to see where it stopped. e.g. queue function1 with a timeout of 5 seconds def function1(): time.sleep(3) print first print

Re: [web2py] Connecting with database that has tables in it

2012-08-13 Thread Khalil KHAMLICHI
yes, but don't forget to add this option to each table definition : migrate=False On Mon, Aug 13, 2012 at 11:47 AM, hasan alnator halna...@gardeniatelco.comwrote: you mean to redefine the tables in the dal like they are in the database ? On Mon, Aug 13, 2012 at 2:43 PM, Khalil KHAMLICHI

Re: [web2py] Re: Enforcing - like gmail: first character of your username should be a letter (a-z) or number.

2012-08-13 Thread Jonathan Lundell
On 13 Aug 2012, at 1:28 PM, Rob_McC mrmccorm...@gmail.com wrote: Just tried with web2py 2.0 release. It worked . auth.define_tables(username=True) db.auth_user.username.requires.insert(0,IS_MATCH([a-z].*)) So, thanks everyone, this certainly answered my first post about the error. I'll

[web2py] Re: How to get started with web2py's Debug? - very basic questions

2012-08-13 Thread Rob_McC
Anthony: *It sounds like he actually opened that file in the admin editor and hit the toggle breakpoint button, which yielded the error. * . Yes, that is what I did- Note: Tried in Version 1.99.7 and Version 2.0.0 (2012-08-09 04:44:17) dev thanks. Rob --

[web2py] Re: NoSQL Question Again!!!

2012-08-13 Thread Massimo Di Pierro
Just install mongo, pymongo and use db=DAL('mongodb://127.0.0.1:5984/db') (the port may be different). Everything else should work as usual.. On Monday, 13 August 2012 14:45:15 UTC-5, Pystar wrote: how do we test it. I am interested in doing that On Monday, August 13, 2012 5:08:04 AM

Re: [web2py] Connecting with database that has tables in it

2012-08-13 Thread Anthony
On Monday, August 13, 2012 4:32:25 PM UTC-4, Khalil KHAMLICHI wrote: yes, but don't forget to add this option to each table definition : migrate=False You don't have to add that to each table definition -- instead, you have two options: DAL(..., migrate=False) will set the default value

[web2py] some explanations needed on prettydate

2012-08-13 Thread Pystar
Hi guys, I am storing my timestamp in my database using the datetime.datetime.now() directive. And on display I want to use prettydate in my views, I am doing this in my views {{=prettydate(row.timestamp, T)}} but it fails silently by not displaying anything. I have tried it in the web2py

[web2py] Web2Py Forum anywhere?

2012-08-13 Thread Brood
Apart from google Groups is there a nice community/forum for web2py users? Cheers --

[web2py] Edit files on GAE?

2012-08-13 Thread Brood
Ok I am new to web2py, python and GAE. I uploaded a simple site made in web2py and now I want to edit a spelling mistake I have made.. However since I can not use FTP how on earth do I edit files? Do I have to edit the file first locally and then upload it somehow? I know probably a stupid

[web2py] Re: some explanations needed on prettydate

2012-08-13 Thread Anthony
prettydate() does this: try: dt = datetime.datetime.now() - d except: return '' In the view, maybe try: {{import datetime}} {{=datetime.datetime.now() - row.timestamp}} and see what error is generated to help figure out the problem. Anthony On Monday, August 13, 2012 5:11:00 PM

Re: [web2py] Re: Scheduler: help us test it while learning

2012-08-13 Thread Daniel Haag
Thanks for your response, 2012/8/12 Niphlod niph...@gmail.com Uhm, serializing part of the output to the table every n seconds - with the output being a stream - would require a buffer/read/flush to update the scheduler_run table that I'm not sure it's feasible: I'll look into that but ATM

[web2py] Re: Web2Py Forum anywhere?

2012-08-13 Thread Anthony
This isn't nice enough? ;-) Actually, there is also http://www.web2pyslices.comhttp://www.web2pyslices.com/home, but Google Groups is the main forum for community discussion. Anthony On Monday, August 13, 2012 5:12:05 PM UTC-4, Brood wrote: Apart from google Groups is there a nice

[web2py] Re: Edit files on GAE?

2012-08-13 Thread Pystar
you have to edit the site locally and upload again with the python appcfg.py /path/to/web2py/folder containing the app.yaml file. simple On Monday, August 13, 2012 10:10:09 PM UTC+1, Brood wrote: Ok I am new to web2py, python and GAE. I uploaded a simple site made in web2py and now I want to

[web2py] Re: Sending emails with background queue problem

2012-08-13 Thread Florian Letsch
Yes, I am using mysql. I've accidentally posted this twice [0] on the group (sorry for that). Anthony asked: How are emails added to the database -- does that happen within the application, or also in a script? Emails are added to the database from within the application (a controller

[web2py] Re: Sending email from background queue

2012-08-13 Thread Florian Letsch
I've accidentally posted this twice. Please have a look at the other thread: https://groups.google.com/forum/?fromgroups#!topic/web2py/u5R-vGcP580%5B1-25%5D I answered your question there (emails are added from within the application). On Sunday, 12 August 2012 06:17:15 UTC+12, Anthony wrote:

Re: [web2py] Re: Electronic voting anybody?

2012-08-13 Thread António Ramos
No, its not private i post all code. No problem. First, study Asterisk. Its all around 2 files extensions.conf, where you define calling rules sip.conf where you define your phone line users in extensions.conf i have exten = 700,1,Answer() same = n,Read(TMP,vm-enter-num-to-call,1,,1,3) same =

[web2py] Helper for many-to-many result sets?

2012-08-13 Thread Mike Girard
I have a movie table that has a many-to-many relationship with a person table expressed through a star table. A simplified version of my model: db.define_table('movie', Field('title','string'), db.define_table('person', Field('name', 'string', unique=True),

[web2py] Problem with download function

2012-08-13 Thread Martin Weissenboeck
Hi, I have a table with texts and uploaded files, something like db.define_table('mails', Field('description'), Field('attach','upload'), Field('receiver') ) and a function to send record 1 as an email: def mymail(): r=db.mails(1) file=URL('download', args=r.attach)

[web2py] Re: Sending emails with background queue problem

2012-08-13 Thread Niphlod
The most probable cause is the transaction isolation problem with mysql as explained in https://groups.google.com/d/msg/web2py/qLHP3iYz8Lo/Ly2wqK4qZZgJ I'm starting to think that it's the only adapter behaving differently. On Monday, August 13, 2012 11:46:11 PM UTC+2, Florian Letsch wrote:

Re: [web2py] Connecting with database that has tables in it

2012-08-13 Thread Khalil KHAMLICHI
cool On Mon, Aug 13, 2012 at 8:55 PM, Anthony abasta...@gmail.com wrote: On Monday, August 13, 2012 4:32:25 PM UTC-4, Khalil KHAMLICHI wrote: yes, but don't forget to add this option to each table definition : migrate=False You don't have to add that to each table definition -- instead,

Re: [web2py] Re: Appengine CPU cycles

2012-08-13 Thread Khalil KHAMLICHI
I suppose a static file that is run once on server start-up and never again would be a good thing. On Mon, Aug 13, 2012 at 1:22 PM, Anthony abasta...@gmail.com wrote: I know, when I wrote that, I only meant to express my hope that this subject be included in web2py's roadmap. OK, that

Re: [web2py] Re: Scheduler: help us test it while learning

2012-08-13 Thread Niphlod
On Monday, August 13, 2012 4:44:18 PM UTC+2, Daniel Haag wrote: I don't know if it would work this way but I would be glad if you could give me some feedback (its actually just a proof of concept - but I did already test it a little):

Re: [web2py] Helper for many-to-many result sets?

2012-08-13 Thread Alec Taylor
It sounds like you want to reduce the fields shown in the results, since you already know some of the information. However the additional queries, though smaller, will require more resources than a simple join. So I recommend just sticking with the join, and displaying in your view what you'd

Re: [web2py] Re: Web2Py Forum anywhere?

2012-08-13 Thread Alec Taylor
Stackoverflow also has a web2py tag, but most of the answers to those questions direct people here :P On 14/08/2012 7:34 AM, Anthony abasta...@gmail.com wrote: This isn't nice enough? ;-) Actually, there is also http://www.web2pyslices.comhttp://www.web2pyslices.com/home, but Google Groups

Re: [web2py] Helper for many-to-many result sets?

2012-08-13 Thread Mike Girard
I don't think you have understood my question. My concern is not that I have too many fields nor my field names. I am asking if there is an easy way to produce a data structure that lends itself to the output I want: Foreach movie in movies print movie.title foreach stars in

Re: [web2py] Helper for many-to-many result sets?

2012-08-13 Thread Alec Taylor
Just use a dictionary to do that. Examples are in the book. On Tue, Aug 14, 2012 at 8:59 AM, Mike Girard mikegirar...@gmail.com wrote: I don't think you have understood my question. My concern is not that I have too many fields nor my field names. I am asking if there is an easy way to

Re: [web2py] some explanations needed on prettydate

2012-08-13 Thread Bruno Rocha
It also happens for me, I did not found a better way to solve, but I think prettydate needs to be rewritten for accurate responses. On Mon, Aug 13, 2012 at 6:11 PM, Pystar aitoehi...@gmail.com wrote: Hi guys, I am storing my timestamp in my database using the datetime.datetime.now()

Re: [web2py] Helper for many-to-many result sets?

2012-08-13 Thread Mike Girard
Yes, that was my plan, failing to locate something quicker and simpler. The other thread I linked to suggested there was something. I was unable to find a suitable example in the book. On Monday, August 13, 2012 7:10:29 PM UTC-4, Alec Taylor wrote: Just use a dictionary to do that.

[web2py] cherokee alive

2012-08-13 Thread Michele Comitini
https://github.com/cherokee/webserver Good to see new commits lately. mic --

[web2py] Functions in Views

2012-08-13 Thread Kevin Miller
Hi All, Can I call custom functions in views? Functions that I have created in my controller/default.py. Thanks. --

Re: [web2py] Functions in Views

2012-08-13 Thread Bruno Rocha
You only can call functions that are in global scope. if you define function in /models/ so you can call those functions in controllers and views. If you defined in controller, so you have to return it to the view. controller/default.py --- def foo(): return bar

Re: [web2py] Functions in Views

2012-08-13 Thread Kevin Miller
Thank you very much Bruno. Just found out that I can return it in view. Thanks a lot for your reply. On Mon, Aug 13, 2012 at 7:48 PM, Bruno Rocha rochacbr...@gmail.com wrote: You only can call functions that are in global scope. if you define function in /models/ so you can call those

Re: [web2py] cherokee alive

2012-08-13 Thread Bruno Rocha
Its Great! I would like to use Cherokee again! (I used it with Pylons on the past) On Mon, Aug 13, 2012 at 9:23 PM, Michele Comitini michele.comit...@gmail.com wrote: https://github.com/cherokee/webserver Good to see new commits lately. mic -- --

[web2py] Re: Functions in Views

2012-08-13 Thread Anthony
The view does not see objects created in the controller unless they are returned in the dict from the controller function that was called. So, you can do: def view_func(arg1, arg2): [do something] return something def index(): return dict(message='Hello World', func=view_func) And

[web2py] Re: Helper for many-to-many result sets?

2012-08-13 Thread Cliff Kachinske
There may be a more elegant way to do this, but it does work. Be sure to select the movie id in your query. Then you can do something like this: rows = db(query).select(.) #whatever you're doing trows = [] stars = [] for i, r in enumerate rows: stars.extend([r.stars.name, BR()]) if

Re: [web2py] Re: Appengine CPU cycles

2012-08-13 Thread Anthony
I suppose a static file that is run once on server start-up and never again would be a good thing. Are you talking about for model definitions? I think there was some discussion of something like this in the past (there would be some limitations, as some model code does in fact depend on

[web2py] Re: Problem with download function

2012-08-13 Thread Anthony
I think, I have not understood the upload function. I have read about it in the book and tried to write my function like these examples - but without success. The misunderstanding is not with upload/download, but with Mail.Attachment -- you have given it the URL for the file (which is

[web2py] Book clarification regarding verify_email reset_password

2012-08-13 Thread JoeCodeswell
Dear web2py folks, In the book it says in /chapter/29/9#Authentication: In Auth, by default, email verification is disabled. To enable email, append the following lines in the model where auth is defined: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11.

[web2py] Re: Book clarification regarding verify_email reset_password

2012-08-13 Thread Anthony
Actually, the book is a bit confusing there -- the example code appears to be complete as is. Anthony On Monday, August 13, 2012 9:09:46 PM UTC-4, JoeCodeswell wrote: Dear web2py folks, In the book it says in /chapter/29/9#Authentication: In Auth, by default, email verification is

Re: [web2py] Re: Appengine CPU cycles

2012-08-13 Thread Bruno Rocha
The easy way is /models/ . nothing here ... /modules/mymodels.py from gluon import current from gluon.dal import DAL, Field def define_my_tables(*table_list): db = DAL() tables_definitions = { owner: {fields: [Field(name), Field(gender)], format: %(name)s, migrate:

  1   2   >