[web2py] Request for some formal guidelines on models in modules

2012-02-27 Thread Johann Spies
The thread in this mailing list with the subject *model less apps (a blog example) *and some other remarks about using model-less applications for better speed and memory usage is the background of this email.I would be glad if the guidelines (not necessarily recipes) on this can become part of

Re: [web2py] Request for some formal guidelines on models in modules

2012-02-27 Thread Bruno Rocha
Massimo and Mariano are developing a conditional model_map, so you will be able to choose which model files to run for each requested controller, it will be a very good add to web2py. Maybe it will be included only in web2py 2.0. I still think we need a model-less approach using modules, and it

[web2py] Re: checklist plugin with templates

2012-02-27 Thread szimszon
There is now a locking functionality on checklist items... You can mark a checklist field as work in progress. If you click on the name of the field and it'll be marked as locked (green). You can unlock it with a next click on the name of the field. If somebody else locked the field it is

Re: [web2py] Re: [w2py-dev] model less apps (a blog example)

2012-02-27 Thread Johann Spies
On 25 February 2012 08:42, Johann Spies johann.sp...@gmail.com wrote: The tables show up in appadmin but not the content and I cannot do csv import or export: type 'exceptions.TypeError' __call__() got an unexpected keyword argument 'ignore_common_filters' On a different computer today

Re: [web2py] Request for some formal guidelines on models in modules

2012-02-27 Thread Johann Spies
On 27 February 2012 10:49, Bruno Rocha rochacbr...@gmail.com wrote: Massimo and Mariano are developing a conditional model_map, so you will be able to choose which model files to run for each requested controller, it will be a very good add to web2py. Maybe it will be included only in web2py

[web2py] Markmin small problems

2012-02-27 Thread Mirek Zvolský
I'm using markmin2html.py. Tables Blockquotes need to have at least one \n before and one \n after. When the table or blockquote is on the begin or end of the source string, workaround is easy: markmin2html(\n + src + \n) will recognize the table properly. But inside the text, if 2

[web2py] Web2py Scheduler

2012-02-27 Thread VIREN PATEL
Hi, I need to implement the Scheduler and Job Queues at the application level. Please suggest some good Schedulers. Also if any one has implemented the schedulers in web2py Thanks, Viren

Re: [web2py] compute on update

2012-02-27 Thread Mirek Zvolský
I think the behaviour of compute= is not good. Most people need calculated field which ALWAYS follow the source values and not just ONCE. So I have found in google group, lot of people fall through the time in same problem and there is still no clear solution. I now need this for Markmin

Re: [web2py] compute on update

2012-02-27 Thread Mirek Zvolský
I think the behaviour of compute= is not good. Most people need calculated field which ALWAYS follow the source values and not just ONCE. So I have found in google group, lot of people fall through the time in same problem and there is still no clear solution. I now need this for

Re: [web2py] Re: Method to interactively experiment with web2py

2012-02-27 Thread Phyo Arkar
My version is 1.98.2 , i updated to 1.99.4 and works fine now! sorry for mis info. On 2/26/12, Luciano Pacheco lucm...@gmail.com wrote: Hi Phyo, I'm using web2py and ipython 0.12 normally. $ ./web2py.py -S instore web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2011

Re: [web2py] Re: cron setup

2012-02-27 Thread Luciano Pacheco
Example: http://movu.ca/demo/article/show/31/web2py-cron-task My first try in movu.ca :-) On Mon, Feb 27, 2012 at 2:32 PM, Sanjeet Kumar sanjeet@gmail.comwrote: Exactly I need the examples On Mon, Feb 27, 2012 at 4:56 AM, Luciano Pacheco lucm...@gmail.comwrote: I think Sanjeet means,

[web2py] Setup Needed For web2py book examples to work

2012-02-27 Thread Alok
Friends I am a beginner trying to learn web2py. I have a windows computer. I have 2 questions. First, I want to learn what Setup is needed for me to try out web2py examples like the following shown in the web2py book print str(DIV(hello world)) divhello world/div I tried using import gluon but

Re: [web2py] Re: Workflow engine for web2py

2012-02-27 Thread António Ramos
Any evolution in this issue. I need it bad. I was thinking in workflow as a service. Instead of changing dal i would submit the record to a webservice verification service that returns a new record, changed according to the rules. Is this a good thinking? and easier to do? Thank you António

[web2py] Re: request.user_agent() dumping

2012-02-27 Thread Ross Peoples
Glad you like the feature! I don't think dimensions are available in the user-agent string that the browser passes to the server. So your only option is to use jQuery or CSS media queries. On Sunday, February 26, 2012 11:13:42 PM UTC-5, weheh wrote: And, I might add, this is simply awesome.

[web2py] Re: Web2py and SSLH

2012-02-27 Thread Ross Peoples
I would be interested to see if SSH can actually be forwarded without triggering a main-in-the-middle error. I'm not sure on the first question, but I would guess that you would want to disable everything except your app. At the bottom of the db.py model, just put session.forget(request). This

[web2py] Re: Setup Needed For web2py book examples to work

2012-02-27 Thread Anthony
First, I want to learn what Setup is needed for me to try out web2py examples like the following shown in the web2py book print str(DIV(hello world)) divhello world/div I tried using import gluon but that did not work. I added web2py in sys.path but the above import still did not

[web2py] Re: How do you define a column name on summed field (i.e. how to do the equivalent of an sql 'select ..... as colname'

2012-02-27 Thread Anthony
That syntax works and I can use that to refer to the data, I could see that a row object had an '_extra' dict for the selected expressions but could not see that the data could be referred to be the name of the expression 'mysum' (its in there somewhere but not sure where!!) The book

Re: [web2py] Re: Workflow engine for web2py

2012-02-27 Thread Richard Vézina
No progress here I didn't have time for that... I involve in any initiative, but we need orientation. I think we should try something (anything) that could work and see what are the limitation of the approach and try other approach (trial and error)... Richard 2012/2/27 António Ramos

Re: [web2py] Re: [w2py-dev] model less apps (a blog example)

2012-02-27 Thread Bruce Wade
I am using a very similar concept now however I am storing all my modules that require access to multiple app's in a different location. At the same level ass gluon For example: web2py -- gluon -- customAPIs - my_api Now in any action where you want to use your api: from customAPIs.my_api

[web2py] Re: Setup Needed For web2py book examples to work

2012-02-27 Thread Alok
Thank you very very much for a quick and complete response. On Feb 27, 5:51 am, Anthony abasta...@gmail.com wrote: First, I want to learn what Setup is needed for me to try out web2py examples like the following shown in the web2py book print str(DIV(hello world)) divhello world/div I

[web2py] Time Substraction

2012-02-27 Thread Sanjeet Kumar
I am going to develop the time management sheet for that i have the one table name employee table and i am allready taken the login and logout time and i want to substract the time when i substract the time it show me in nanoseconds when i convert this nanosecond to the minute it totally

[web2py] Re: Possible bug with user_signature?

2012-02-27 Thread Bruce Wade
Ok it looks like the bug is related to: URL('action/additional_parms', user_signature=True) if you have something in addition to the action @auth.requires_signature fails. When using: FORM(_action=URL('adviewer','savesettings/location', user_signature=True)) or redirect(URL('payment/%s' %

Re: [web2py] Re: cron setup

2012-02-27 Thread Bruno Rocha
thanks Luciano! I will migrate your recipe to the new web2pyslices website. http://zerp.ly/rochacbruno Em 27/02/2012 09:16, Luciano Pacheco lucm...@gmail.com escreveu: Example: http://movu.ca/demo/article/show/31/web2py-cron-task My first try in movu.ca :-) On Mon, Feb 27, 2012 at 2:32

[web2py] Re: Markmin small problems

2012-02-27 Thread Massimo Di Pierro
Please open ticket on google code. I agree this should be fixed. On Feb 27, 3:34 am, Mirek Zvolský zvol...@seznam.cz wrote: I'm using markmin2html.py. Tables Blockquotes need to have at least one \n before and one \n after. When the table or blockquote is on the begin or end of the source

[web2py] Re: Web2py Scheduler

2012-02-27 Thread Massimo Di Pierro
web2py has a built-in scheduler: http://web2py.com/books/default/chapter/29/4?search=scheduler#Scheduler-(experimental) On Feb 27, 3:43 am, VIREN PATEL viren...@gmail.com wrote: Hi, I need to implement the Scheduler and Job Queues at the application level. Please suggest some good Schedulers.

[web2py] Re: compute on update

2012-02-27 Thread Massimo Di Pierro
Please open a ticket. I may fix this later today. On Feb 27, 4:10 am, Mirek Zvolský zvol...@seznam.cz wrote: I think the behaviour of compute= is not good. Most people need calculated field which ALWAYS follow the source values and not just ONCE. So I have found in google group, lot of

[web2py] Re: Possible bug with user_signature?

2012-02-27 Thread Massimo Di Pierro
Is the user logged in? If the user is not logged in this is the intended behavior. Massimo On Feb 22, 5:19 pm, Bruce Wade bruce.w...@gmail.com wrote: When using user_signature=True in a form that action goes to another method and that method has @auth.requires_signature I am getting access

[web2py] GaeGoogleAccount - error ?

2012-02-27 Thread Lazarof
Hello group! In application that worked well over a year I used: # If running on Google App Engine if request.env.web2py_runtime_gae: gluon.contrib.login_methods.gae_google_account import from GaeGoogleAccount GaeGoogleAccount auth.settings.login_form = () Now it is returning this error:

[web2py] Re: Obtaining URL to image blob in GAE

2012-02-27 Thread howesc
i'm using the blobstore so i can upload images larger than 1mb. because of that i have access to http://code.google.com/appengine/docs/python/images/functions.html#Image_get_serving_url which gives a URL that google serves up the image (and does not count against CPU for your app engine

[web2py] Re: Possible bug with user_signature?

2012-02-27 Thread Anthony
In URL('adviewer', 'savesettings/location', user_signature=True) the URL() function sees function='savesettings/location' and args=None. However, when a request is made to the URL generated by the above, the function that verifies the signature sees function='savesettings' and

[web2py] Re: Time Substraction

2012-02-27 Thread Ross Peoples
Well, one of the issues is going to be that you are using 'date' for your fields instead of 'datetime'. When using 'datetime', it becomes easy to do something like this: delta = row.employee_logout_date - row.employee_login_date minutes = delta.minutes + (delta.hours * 60) On Monday, February

Re: [web2py] Request for some formal guidelines on models in modules

2012-02-27 Thread pbreit
I feel like if I'm going to try and learn model-less app development, it's time to re-evaluate other frameworks.

Re: [web2py] Re: db select with left but concatenated orderby fields?

2012-02-27 Thread Richard Vézina
I think there is problem with orderby here too... I have a field that contain those data : f1 row1 : 172 row2 : 1212 Then db.table2.fied1table2.requires = IS_IN_DB(db, 'table.f1','%(f1)s',orderby=('f1')) I never get the proper order of table1 rows... 1212, 172 in my dropbox instead of 172,

Re: [web2py] Re: Possible bug with user_signature?

2012-02-27 Thread Bruce Wade
User is logged in, it works on other URLs. Anthony, thanks for explaining how URL works, changing the URL to use args has solved the problem. On Mon, Feb 27, 2012 at 12:07 PM, Anthony abasta...@gmail.com wrote: In URL('adviewer', 's**avesettings/location', user_signature=True) the URL()

[web2py] Re: How do you define a column name on summed field (i.e. how to do the equivalent of an sql 'select ..... as colname'

2012-02-27 Thread Paul
One last part of the puzzle, this all works ok at the command line with print row[mysum] but I cannot get the syntax for using this in a view for example:- controller DAL query:- def mileage(): mysum = db.t_appointment.miles_to.sum() +db.t_appointment.miles_from.sum() groupmm =

[web2py] Re: How do you define a column name on summed field (i.e. how to do the equivalent of an sql 'select ..... as colname'

2012-02-27 Thread Anthony
The view only sees what you explicitly pass to it from the controller via the returned dictionary, so you would need to do: def mileage(): [snip] return dict(rows=rows, mysum=mysum, sql=db._lastsql) Or you could just do: return locals() which returns a dictionary of all the local

[web2py] Re: How do you define a column name on summed field (i.e. how to do the equivalent of an sql 'select ..... as colname'

2012-02-27 Thread Massimo Di Pierro
you need to put it in the dict so the view can see it. On Feb 27, 2:57 pm, Paul paul.robinson...@gmail.com wrote: One last part of the puzzle, this all works ok at the command line with print row[mysum] but I cannot get the syntax for using this in a view for example:- controller DAL

Re: [web2py] Request for some formal guidelines on models in modules

2012-02-27 Thread Bruno Rocha
On Mon, Feb 27, 2012 at 5:31 PM, pbreit pbreitenb...@gmail.com wrote: I feel like if I'm going to try and learn model-less app development, it's time to re-evaluate other frameworks. I do not agree, web2py has a lot of features, executed models and global scope are not the only good feature

Re: [web2py] Re: db select with left but concatenated orderby fields?

2012-02-27 Thread Richard Vézina
Forget about that my mistakes... I should use field proper type (integer)... Richard On Mon, Feb 27, 2012 at 3:42 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: I think there is problem with orderby here too... I have a field that contain those data : f1 row1 : 172 row2 : 1212

Re: [web2py] oauth 2.0 and facebook expires parameter

2012-02-27 Thread Michele Comitini
Hi Can, FB used to send a non standard parameter expires_in, did they change it? Here is the code that should handle expires_in: https://github.com/mdipierro/web2py/blob/master/gluon/contrib/login_methods/oauth20_account.py#L124 mic Il giorno 26 febbraio 2012 12:15, Can Candan

Re: [web2py] Request for some formal guidelines on models in modules

2012-02-27 Thread Anthony
Also, keep in mind that model-less can mean many things. It doesn't necessarily entail the highly class-based approach you see in Bruno's Movuca. It could mean simply moving some standard table definitions from model files into functions in modules. In fact, I think Bruno's class-based design

[web2py] Re: GaeGoogleAccount - error ?

2012-02-27 Thread howesc
i just had a client report this issue to me today as well. sometime this week i'll be digging in to it - but it might not be today. On Monday, February 27, 2012 11:40:46 AM UTC-8, Lazarof wrote: Hello group! In application that worked well over a year I used: # If running on Google App

[web2py] web2py hosting on dotcloud

2012-02-27 Thread cyan
Hi everyone, I'm new to web2py framework, and would like to host some app on dotcloud (dotcloud.com). Apparently, people have managed to done this successfully, and I wonder if someone could share their experience/procedure to deploy a web2py app on dotcloud. I've been trying to use dotcloud's

[web2py] Re: Obtaining URL to image blob in GAE

2012-02-27 Thread BrendanC
Peter, I was trying to get this to work last week and this is what finally worked for me. Here's a link to my earlier thread on the same topic. https://groups.google.com/forum/?fromgroups#!topic/web2py/1h3Nd3_T9Js In my case I'm storing small blobs in the table/model - although that's not the

[web2py] Re: Possible bug with user_signature?

2012-02-27 Thread Massimo Di Pierro
I am treating this as a bug. now fixed in trunk. On Feb 27, 2:07 pm, Anthony abasta...@gmail.com wrote: In URL('adviewer', 'savesettings/location', user_signature=True) the URL() function sees function='savesettings/location' and args=None. However, when a request is made to the URL

Re: [web2py] Re: Possible bug with user_signature?

2012-02-27 Thread Bruce Wade
Thanks On Mon, Feb 27, 2012 at 2:58 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I am treating this as a bug. now fixed in trunk. On Feb 27, 2:07 pm, Anthony abasta...@gmail.com wrote: In URL('adviewer', 'savesettings/location', user_signature=True) the URL() function

[web2py] Re: How do you define a column name on summed field (i.e. how to do the equivalent of an sql 'select ..... as colname'

2012-02-27 Thread Paul
OK, I can get this to work in the view now, but it seems to be overly complicated, I have one dal statement to generate some rows, but if I want lots of sums, mins and max etc I then need to pass all these additional objects via the dict to the view!, when surely all this data should be just part

[web2py] Re: How do you define a column name on summed field (i.e. how to do the equivalent of an sql 'select ..... as colname'

2012-02-27 Thread Massimo Di Pierro
I am not convinced that rows = db().select(db.table.field1.sum() as foo) + {{=row.foo}} is any simpler than foo = db.table.field1.sum() rows = db().select(foo) + {{=row[foo]}} The latter has the advantage that does not generate conflicts at the DB level. As far as I know the book is almost

[web2py] Re: Time Substraction

2012-02-27 Thread Sanjeet Kumar
showing AttributeError: 'datetime.timedelta' object has no attribute 'minutes' On Tuesday, February 28, 2012 1:47:40 AM UTC+5:30, Ross Peoples wrote: Well, one of the issues is going to be that you are using 'date' for your fields instead of 'datetime'. When using 'datetime', it becomes

[web2py] V199.4 Error when define table in module and import it?

2012-02-27 Thread IVINH
HI, Please help me for this error: Traceback (most recent call last): File E:\web2py1994\gluon\restricted.py, line 204, in restricted exec ccode in environment File E:/web2py1994/applications/app/controllers/plugin_attach.py

[web2py] Re: How do you define a column name on summed field (i.e. how to do the equivalent of an sql 'select ..... as colname'

2012-02-27 Thread Anthony
I am not convinced that rows = db().select(db.table.field1.sum() as foo) + {{=row.foo}} is any simpler than foo = db.table.field1.sum() rows = db().select(foo) + {{=row[foo]}} The problem is in the latter case, you have to pass foo to the view -- not a big deal with just

[web2py] Re: Obtaining URL to image blob in GAE

2012-02-27 Thread Anthony
If there's a better way here, plaese let me know. The following should work for you: def show_image(): return image - this method is referenced from the view - see below if not request.args[0]: return None id = request.args[0]

[web2py] Re: request.user_agent() dumping [closed]

2012-02-27 Thread weheh
.

[web2py] Database deadlocks with new scheduler

2012-02-27 Thread David Phillips
I am experiencing database deadlocks in a worker processes that is being scheduled by web2py's new scheduler. I'm using the latest web2py with Python 2.7.2 and MySQL (a recent release) on OS X 10.7.3. The worker does a lengthy calculation that I wanted to take off the http thread. Every time I

[web2py] Re: Time Substraction

2012-02-27 Thread Massimo Di Pierro
Delta has only days and seconds. On Feb 27, 9:55 pm, Sanjeet Kumar sanjeet@gmail.com wrote:  showing AttributeError: 'datetime.timedelta' object has no attribute 'minutes' On Tuesday, February 28, 2012 1:47:40 AM UTC+5:30, Ross Peoples wrote: Well, one of the issues is going to

[web2py] Re: V199.4 Error when define table in module and import it?

2012-02-27 Thread Massimo Di Pierro
Not sure what the problem is but this is definitively cause for trouble: T = current.T In fact that is not thread safe. You cannot reference stuff in current outside a function or method. On Feb 27, 10:39 pm, IVINH toa...@gmail.com wrote: HI, Please help me for this error: Traceback (most

[web2py] Re: How do you define a column name on summed field (i.e. how to do the equivalent of an sql 'select ..... as colname'

2012-02-27 Thread Massimo Di Pierro
you can do: for row in rows: row.foo = row[foo] and then you do not have to pass it. On Feb 27, 10:40 pm, Anthony abasta...@gmail.com wrote: I am not convinced that rows = db().select(db.table.field1.sum() as foo) +  {{=row.foo}} is any simpler than foo = db.table.field1.sum()

[web2py] Re: Database deadlocks with new scheduler

2012-02-27 Thread Massimo Di Pierro
Do you do this in a controller? db.scheduler_task.insert(...) if not. Make sure you db.commit() immediately after. Would is solve the problem? On Feb 27, 9:14 pm, David Phillips david.phillips@gmail.com wrote: I am experiencing database deadlocks in a worker processes that is being

Re: [web2py] Re: Time Substraction

2012-02-27 Thread Sanjeet Kumar
Thanks Massimo On Tue, Feb 28, 2012 at 10:33 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Delta has only days and seconds. On Feb 27, 9:55 pm, Sanjeet Kumar sanjeet@gmail.com wrote: showing AttributeError: 'datetime.timedelta' object has no attribute 'minutes'

Re: [web2py] Request for some formal guidelines on models in modules

2012-02-27 Thread Johann Spies
On 28 February 2012 00:25, Anthony abasta...@gmail.com wrote: Also, keep in mind that model-less can mean many things. It doesn't necessarily entail the highly class-based approach you see in Bruno's Movuca. It could mean simply moving some standard table definitions from model files into

[web2py] Error that i really dont understand

2012-02-27 Thread Hassan Alnatour
Dear All, i have an error can you help me .. This is the error .. Traceback (most recent call last): File C:\web2py\gluon\restricted.py, line 204, in restricted exec ccode in environment File C:\web2py\applications\Golden_Star\views\default/ Courses.html, line 41, in module