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

2012-08-14 Thread Bruno Rocha
Taking this exact example Foreach movie in movies print movie.title foreach stars in movie.stars print star.name I guess `movie.stars` is a list:string field? if so.. there's one-liner solution table = TABLE(*[TR(TD(movie.title), TD(UL(*[LI(star.name) for star in

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

2012-08-14 Thread Bruno Rocha
I guess you can also do: table = TABLE(*[TR(TD(movie.title), TD(UL(*[LI(star.name) for star in * movie.stars.select()*])) for movie in movies]) when a table is referenced by another, he gets a DAL Set object with the referer name. movie.*stars *will be a DAL Set. which has *select, update,

[web2py] redirect results in invalid request.

2012-08-14 Thread Annet
As part of a router function I have the following code: id=request.args(0) account=db(db.NodeAccount.nodeID==id).select(db.NodeAccount.ALL).first() if account: if account.statusID!=1: # in that case the account is blocked or under maintenance redirect(URL('card',args=id)) elif

Re: [web2py] redirect results in invalid request.

2012-08-14 Thread Marin Pranjić
On Tue, Aug 14, 2012 at 10:14 AM, Annet anneve...@googlemail.com wrote: In a controller I start the index function with the following code: if not len(request.args): redirect(URL('addressbook','router')) elif not session[request.args(0)]:

[web2py] Re: Sending emails with background queue problem

2012-08-14 Thread Niphlod
The problem sums up to: I expect when committing that something like saving a file happens...everybody, and I mean everybody trying to access that file later would read the same thing. SQlite, MSSQL, Postgresql, Oracle adapters work this way, and I assume also mongo and couchdb. I tried to read

Re: [web2py] redirect results in invalid request.

2012-08-14 Thread Marin Pranjić
edit: URL('addressbook', 'router', args=request.args(0)) On Tue, Aug 14, 2012 at 10:34 AM, Marin Pranjić marin.pran...@gmail.comwrote: On Tue, Aug 14, 2012 at 10:14 AM, Annet anneve...@googlemail.com wrote: In a controller I start the index function with the following code: if not

Re: [web2py] redirect results in invalid request.

2012-08-14 Thread Annet
Hi Marin. Thanks for your reply, problem solved. Annet. --

[web2py] comparing responding arg with request.args(0)

2012-08-14 Thread Annet
My application largely depends on request.args(0), which holds the id of a node. When visitors don't change the id in the url this works well, however, when a visitor changes the url, the applications' behaviour becomes unpredictable. I think I can solve this problem by comparing the

[web2py] web2py for embedded hardware control

2012-08-14 Thread Sam
Hi all, I'm fairly new to web2py and python, but I'm trying to build a 'proof of concept' system to demonstrate how one of our products might work. The system consists of an embedded Linux board and an RS232 serial digital compass. The system will read the orientation from the compass and

[web2py] Re: redirect results in invalid request.

2012-08-14 Thread Anthony
Note, the signature of the URL() function is URL(a, c, f, r, args, vars, ...). So, in your first example, it interprets addressbook as the application and request.args(0) as the function, and in your second example, it interprets request.args(0) as the request object (which is why you get the

[web2py] Re: comparing responding arg with request.args(0)

2012-08-14 Thread Anthony
What do you mean by responding arg? On Tuesday, August 14, 2012 5:57:29 AM UTC-4, Annet wrote: My application largely depends on request.args(0), which holds the id of a node. When visitors don't change the id in the url this works well, however, when a visitor changes the url, the

Re: [web2py] web2py for embedded hardware control

2012-08-14 Thread José Luis Redrejo Rodríguez
I think you're not going to have good results with web2py for this kind of project. I'd encourage you to take a look at projects as http://mblogic.sourceforge.net/ , which using python (and a bit of javascript) allows you to control, and report or easily showing animated bars and graphics. mblogic

[web2py] Change the default format.

2012-08-14 Thread Picheth
I have a problem I want to change the values ​​stored into the database data_id value of id. db.define_table('product', Field('data_id','integer'), Field('name','string') format='%(name)s') please .. any help, cues or snippets of codes to accomplish

[web2py] Using Decorators for RESTful URLs

2012-08-14 Thread deepak
Hi all, Could anybody help me give a heads up on how to use RESTful service with URL decorators in web2py? Deepak --

[web2py] Re: Change the default format.

2012-08-14 Thread Anthony
It's not quite clear what you want to do -- could you be more specific and maybe provide an example? On Tuesday, August 14, 2012 1:55:00 AM UTC-4, Picheth wrote: I have a problem I want to change the values ​​stored into the database data_id value of id. db.define_table('product',

[web2py] Re: Using Decorators for RESTful URLs

2012-08-14 Thread Anthony
Are you asking how to use the @request.restful decorator, or how to use additional decorators along with that one? If the former, check out http://web2py.com/books/default/chapter/29/10#Restful-Web-Services; if the latter, here's an example with an auth decorator:

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

2012-08-14 Thread tigmmi
I would like to have it on insert. Like for example a mouvement number that start with 100 not 1 as is the case for id. I have foud another alternative in fiorm.accepts(): def index(): example action using the internationalization operator T and flash rendered by

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

2012-08-14 Thread tigmmi
I would like to have it on DAL mysql specific. I found the _befor_insert and other events very intresent and can hel in many part of my code. Thansk to Massimo. On Monday, August 13, 2012 6:33:59 PM UTC, Cliff Kachinske wrote: In MySQL there is ALTER TABLE mytable AUTO_INCREMENT = 500 Is

Re: [web2py] web2py for embedded hardware control

2012-08-14 Thread Sam
Thanks for you suggestion, i'll take a look. On Tuesday, 14 August 2012 11:52:47 UTC+1, José Luis Redrejo Rodríguez wrote: I think you're not going to have good results with web2py for this kind of project. I'd encourage you to take a look at projects as http://mblogic.sourceforge.net/ ,

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

2012-08-14 Thread Mandar Vaze
On Saturday, August 11, 2012 4:28:24 AM UTC+5:30, Derek wrote: That definitely looks like a problem. Still though, I think you are taking 3NF a bit too far, no? What I have given below is an example. So it would look i'm taking 3NF too far. But in my real app, have about 10-15 tables,

Re: [web2py] Re: Book clarification regarding verify_email reset_password

2012-08-14 Thread Bruno Rocha
Thinking again I am guessing a better option for this... (note: the problem here is not to get the 'key', the problem is to be able to build the string and interpolate multiple keys on to it on different running times) I think this could be better. auth,messages.verify_email = 'Click on the

[web2py] Auth and Model less

2012-08-14 Thread Felipe Meirelles
Hello again, I'm having some trouble with my model less aproch with auth module. I've put him on a separeted file on modules folder, and, when needed, I import it as follows: modules/web2py/auth.py: auth = Auth(db, hmac_key=Auth.get_or_create_key()) controllers/tracking.py: from

Re: [web2py] Re: Book clarification regarding verify_email reset_password

2012-08-14 Thread Anthony
auth,messages.verify_email = ('Here I put my very long html code' 'I can write texts ' 'I can put a tutorial ' 'I can put an user agreement'

[web2py] compute fields do not show up in SQLFORM view form

2012-08-14 Thread Mandar Vaze
I have a few fields that have compute attribute defined. I've only inserted the records via script - compute fields are updated correctly. I have a SQLFORM.grid which shows a join query. When I explicitly select the computed field in the fields param - it is shown correctly. But when I click

Re: [web2py] compute fields do not show up in SQLFORM view form

2012-08-14 Thread Bruno Rocha
in your controller.. if request.args(0) == view: db.table.field.readable = True grid = SQLFORM.grid(.) http://zerp.ly/rochacbruno Em 14/08/2012 09:37, Mandar Vaze mandarv...@gmail.com escreveu: I have a few fields that have compute attribute defined. I've only inserted the records

[web2py] Re: Auth and Model less

2012-08-14 Thread Anthony
modules/web2py/auth.py: auth = Auth(db, hmac_key=Auth.get_or_create_key()) Where does that db object come from? Note, global objects are defined only once when the module is first imported, so any such objects are associated with the first request and are not re-created with each request.

Re: [web2py] Re: Auth and Model less

2012-08-14 Thread Felipe Meirelles
But the DB object can be static through requests as well or I should instantiate it on every request too? On Tue, Aug 14, 2012 at 10:02 AM, Anthony abasta...@gmail.com wrote: modules/web2py/auth.py: auth = Auth(db, hmac_key=Auth.get_or_create_**key()) Where does that db object come from?

Re: [web2py] Re: Book clarification regarding verify_email reset_password

2012-08-14 Thread Jonathan Lundell
On 14 Aug 2012, at 5:35 AM, Anthony abasta...@gmail.com wrote: auth,messages.verify_email = ('Here I put my very long html code' 'I can write texts ' 'I can put a tutorial '

Re: [web2py] Re: Auth and Model less

2012-08-14 Thread Anthony
On Tuesday, August 14, 2012 9:14:21 AM UTC-4, Felipe Meirelles wrote: But the DB object can be static through requests as well or I should instantiate it on every request too? You should instantiate on every request (that needs the db). Anthony --

[web2py] HTTPS and the Rocket server?

2012-08-14 Thread Alec Taylor
I am testing some authentication mechanisms with janrain locally using a modified /etc/hosts name. Unfortunately it keeps redirecting to `https://` rather than to `http://`. Is there a way I can get Rocket to server as https? (I can generate unverified certs :P) Or is there a better way I can

Re: [web2py] Depoying on GAE. Frustration. Followed directions but still getting error.

2012-08-14 Thread Alexei Vinidiktov
If you are using the app launcher, what are its logs saying? Sent from my iPad On 14.08.2012, at 11:52, SeamusSeamus morrisjamespatr...@gmail.com wrote: HI. I followed the directions on the deployment recipe seen here http://web2py.com/books/default/chapter/29/13 I still get:

Re: [web2py] web2py 2.0 almost done

2012-08-14 Thread Marin Pranjić
Patch is in attachment. Marin On Mon, Aug 13, 2012 at 4:52 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: 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:

Re: [web2py] compute fields do not show up in SQLFORM view form

2012-08-14 Thread Mandar Vaze
I have not set readable flag during db definition. Is it set to False by default, for compute fields ? On Tuesday, August 14, 2012 6:16:20 PM UTC+5:30, rochacbruno wrote: in your controller.. if request.args(0) == view: db.table.field.readable = True grid = SQLFORM.grid(.) Does

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

2012-08-14 Thread Rob_McC
Hey Jon: *Q: * BTW, are you deliberately *forbidding* upper-case letters? *A: *. *Yes*, just like Google does, usernames are lowercase, although if your gmail username is *johnsmith* you can log in with *JohnSmith*, or *JOHNSMITH*, or *Johnsmith* etc.

Re: [web2py] Re: Appengine CPU cycles

2012-08-14 Thread Khalil KHAMLICHI
This is what I am talking about, this functionality/dependency on requests needs to be moved to controllers, leaving models as a run once file. as some model code does in fact depend on the request and must be run each request). Anthony -- --

[web2py] Re: comparing responding arg with request.args(0)

2012-08-14 Thread Annet
Hi Anthony, In a request I use request.args(0) to determine the response, for instance http://127.0.0.1:8000/bootstrap/calendar/eventlist/6 In this case 6 is the argument of the response, when the visitor changes this argument manually and requests

[web2py] Re: redirect results in invalid request.

2012-08-14 Thread Annet
Hi Anthony, Thanks for your explanation. After reading it I haven't got a clue why I thought this: redirect(URL('bootstrap',' addressbook','router',request.args(0))) would work, especially after writing so many correct urls. Best regards, Annet --

[web2py] Re: Book clarification regarding verify_email reset_password

2012-08-14 Thread JoeCodeswell
Thanks for the info, everyone. I thought the example might look OK as is, but i really don't understand everything the way you folks do. I have a bit of a follow up question. The ENTIRE example *seems* to imply that the following lines are *NEEDED* to enable email verification:

Re: [web2py] Re: Appengine CPU cycles

2012-08-14 Thread Anthony
On Tuesday, August 14, 2012 11:17:57 AM UTC-4, Khalil KHAMLICHI wrote: This is what I am talking about, this functionality/dependency on requests needs to be moved to controllers, leaving models as a run once file. Moving part of the model definitions to the controller is counter to the M/C

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

2012-08-14 Thread Anthony
Note, you shouldn't need: db.auth_user.password.requires.insert(0,IS_LENGTH(minsize=8)) given that you specify min_length in the CRYPT validator. You might consider the IS_STRONG validator as well. Anthony On Tuesday, August 14, 2012 11:11:42 AM UTC-4, Rob_McC wrote: Hey Jon: *Q: *

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

2012-08-14 Thread Jonathan Lundell
On 14 Aug 2012, at 8:11 AM, Rob_McC mrmccorm...@gmail.com wrote: Hey Jon: Q: BTW, are you deliberately forbidding upper-case letters? A: . Yes, just like Google does, usernames are lowercase, although if your gmail username is johnsmith you can log in with JohnSmith,

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

2012-08-14 Thread Jonathan Lundell
On 14 Aug 2012, at 8:47 AM, Anthony abasta...@gmail.com wrote: Note, you shouldn't need: db.auth_user.password.requires.insert(0,IS_LENGTH(minsize=8)) given that you specify min_length in the CRYPT validator. You might consider the IS_STRONG validator as well. It's maybe worth pointing

Re: [web2py] Re: Auth and Model less

2012-08-14 Thread Felipe Meirelles
Now I'm getting this error when I call the initialization method: SyntaxError: invalid table name: auth_user On Tue, Aug 14, 2012 at 10:38 AM, Anthony abasta...@gmail.com wrote: On Tuesday, August 14, 2012 9:14:21 AM UTC-4, Felipe Meirelles wrote: But the DB object can be static through

[web2py] Re: Book clarification regarding verify_email reset_password

2012-08-14 Thread Anthony
Yes, you want to set that to True. Just fixed those two errors, and tried to clarify the language regarding the URLs. Anthony On Tuesday, August 14, 2012 11:31:09 AM UTC-4, JoeCodeswell wrote: Thanks for the info, everyone. I thought the example might look OK as is, but i really don't

Re: [web2py] Re: Auth and Model less

2012-08-14 Thread Anthony
Can you show the exact code you're using in the module and controller? On Tuesday, August 14, 2012 12:07:15 PM UTC-4, Felipe Meirelles wrote: Now I'm getting this error when I call the initialization method: SyntaxError: invalid table name: auth_user On Tue, Aug 14, 2012 at 10:38 AM,

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

2012-08-14 Thread Rob_McC
Thanks. -1- *you might consider the IS_STRONG validator as well. *. What a quick and easy way to increase security of passwords, thanks for tip. This is what I love about web2py. http://web2py.com/books/default/chapter/29/7 Example: requires = IS_STRONG(min=10, special=2, upper=2) where

[web2py] Re: comparing responding arg with request.args(0)

2012-08-14 Thread Anthony
OK, I guess it's a nomenclature issue -- args are part of the URL requested and therefore only part of the request, not the response. Rather, you need to validate whether the request arg is valid for the particular user. Of course, you can store the user's node id in the session, but if you are

[web2py] What purpose? Search - Edit App Screen - web2py application, v 1.99 and 2.00

2012-08-14 Thread Rob_McC
*Quick Question: What does the search box do at the top, when editiing a web2py app? *(see screenshot)* * I assumed it would search all my app files for occurrence of a word, then present me with a list of which files contained that word. (Like Coda, BBEdit, - most text edtitors let you

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

2012-08-14 Thread Anthony
It's maybe worth pointing out that these validators should be imposed only when registering or changing a password, not during login. The problem with having password validators on login is that they leak password constraints to an attacker. (Of course, the registration form can be used

[web2py] session[id].r['Nav']['function']=True TypeError: 'NoneType' object is unsubscriptable

2012-08-14 Thread Annet
I have the following lines of code: aboutnav=db((db.NodeNav.nodeID==id)(db.NodeNav.navID==db.Nav.id)(db.Nav.navbarID==ABOUTNAVBARID)).select(db.Nav.ALL,db.NodeNav.ALL,orderby=db.Nav.position).as_list() if aboutnav: session[id].aboutnav=True for r in aboutnav: if

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

2012-08-14 Thread Jonathan Lundell
On 14 Aug 2012, at 9:19 AM, Rob_McC mrmccorm...@gmail.com wrote: validators on login is that they leak password constraints to an attacker. (Of course, the registration form can be used to extract this information as well, but still...) - I think I understand, when you say leak--

[web2py] Re: What purpose? Search - Edit App Screen - web2py application, v 1.99 and 2.00

2012-08-14 Thread Anthony
It's part of a psychological experiment -- we're counting how many times you click on it. ;-) Actually, it looks like the button isn't working, but if you hit return, it should run the search you expect. Anthony On Tuesday, August 14, 2012 12:33:13 PM UTC-4, Rob_McC wrote: *Quick Question:

Re: [web2py] Re: Auth and Model less

2012-08-14 Thread Felipe Meirelles
Sorry, the DB was still static. Just created a init_db() and worked as spected. On Tue, Aug 14, 2012 at 1:18 PM, Anthony abasta...@gmail.com wrote: Can you show the exact code you're using in the module and controller? On Tuesday, August 14, 2012 12:07:15 PM UTC-4, Felipe Meirelles wrote:

[web2py] Re: session[id].r['Nav']['function']=True TypeError: 'NoneType' object is unsubscriptable

2012-08-14 Thread Anthony
Is session[id] a Storage object? If so, if you do session[id].r and r does not exist, the Storage object will return None. If you try to do session[id].r['Nav'], it will attempt to subscript None with 'Nav', which won't work. Anthony On Tuesday, August 14, 2012 12:36:22 PM UTC-4, Annet wrote:

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

2012-08-14 Thread Jonathan Lundell
On 14 Aug 2012, at 9:33 AM, Anthony abasta...@gmail.com wrote: It's maybe worth pointing out that these validators should be imposed only when registering or changing a password, not during login. The problem with having password validators on login is that they leak password constraints to

Re: [web2py] Re: Auth and Model less

2012-08-14 Thread Felipe Meirelles
Well, but even initializing db and auth for evey request I still get the not validating bug... ill attach my code to you to take a look. On Tue, Aug 14, 2012 at 1:44 PM, Felipe Meirelles poz...@gmail.com wrote: Sorry, the DB was still static. Just created a init_db() and worked as spected.

Re: [web2py] Re: Auth and Model less

2012-08-14 Thread Felipe Meirelles
I'm also using memcache to store the session as follows: from gluon.contrib.gae_memcache import MemcacheClient from gluon.contrib.memdb import MEMDB cache.memcache = MemcacheClient(request) cache.ram = cache.disk = cache.memcache session.connect(request,response,MEMDB(cache.memcache)) On Tue,

[web2py] Re: session[id].r['Nav']['function']=True TypeError: 'NoneType' object is unsubscriptable

2012-08-14 Thread Annet
Is session[id] a Storage object? Yes. If so, if you do session[id].r and r does not exist, the Storage object will return None. r does exist, otherwise this condition would fail: elif r['NodeNav']['frontend']: If you try to do session[id].r['Nav'], it will attempt to subscript None

[web2py] Re: Using Decorators for RESTful URLs

2012-08-14 Thread deepak
I want to use RESTful URL patters likewise in Flask, ' http://publish.luisrei.com/articles/flaskrest.html' All I could end up finding was to make use of routes.py [routes_in routes_out]. Deepak --

[web2py] Re: comparing responding arg with request.args(0)

2012-08-14 Thread Annet
So, wherever you are now using request.args(0), you would instead reference something like session.nodeID. If session.nodeID doesn't exist, you then redirect to your router so it can be set. That's what I've been experimenting with the last couple of days, it works fine for the single

Re: [web2py] Re: Using Decorators for RESTful URLs

2012-08-14 Thread Alec Taylor
Maybe this example will help: https://groups.google.com/forum/#!topic/web2py/efrSxAT9AnU On Wed, Aug 15, 2012 at 3:10 AM, deepak deepakshankar...@gmail.com wrote: I want to use RESTful URL patters likewise in Flask, 'http://publish.luisrei.com/articles/flaskrest.html' All I could end up

Re: [web2py] Re: Alternative to Janrain: in pure Python

2012-08-14 Thread Alec Taylor
Can we get an update? I think this would be a good selling point for web2py, if ported. On Thursday, July 19, 2012 8:12:43 AM UTC+10, Daniel Gonzalez wrote: Hi, I have tried the example in this sanction library and it looks that the authentication using oauth2 is really easy to implement.

Re: [web2py] Re: web2py 2.0 almost done

2012-08-14 Thread dave
this is one of the main changes I was looking forward for 2.0, I would rather wait until the integration is complete On Thursday, August 9, 2012 9:43:28 AM UTC-7, AngeloC wrote: Hi Massimo, I think I cannot complete the bootstrap/web2py css merging in time for 2.0, it's really a lot of

[web2py] Re: Using Decorators for RESTful URLs

2012-08-14 Thread Anthony
It looks like you could do all of that with web2py. Can you be more specific regarding how you want your URLs to look and what they should retrieve. In addition to RESTful services and routing, have you looked at the basics: http://web2py.com/books/default/chapter/29/4#Dispatching? Anthony On

[web2py] Re: comparing responding arg with request.args(0)

2012-08-14 Thread Anthony
So, wherever you are now using request.args(0), you would instead reference something like session.nodeID. If session.nodeID doesn't exist, you then redirect to your router so it can be set. That's what I've been experimenting with the last couple of days, it works fine for the single

[web2py] Re: session[id].r['Nav']['function']=True TypeError: 'NoneType' object is unsubscriptable

2012-08-14 Thread Anthony
If so, if you do session[id].r and r does not exist, the Storage object will return None. r does exist, otherwise this condition would fail: elif r['NodeNav']['frontend']: I meant if r does not exist within session -- although r exists at the top level, there is no session.r defined,

[web2py] Re: Functions in Views

2012-08-14 Thread Pystar
I am having issues calling the prettydate function in my views as its not working, I pull the datetime variable stored in my database and when I call the prettydate function, it fails quietly without throwing any errors. On Tuesday, August 14, 2012 1:50:52 AM UTC+1, Anthony wrote: The view

[web2py] Re: Functions in Views

2012-08-14 Thread Anthony
I am having issues calling the prettydate function in my views as its not working, I pull the datetime variable stored in my database and when I call the prettydate function, it fails quietly without throwing any errors. Are you saying it only fails in the view? I know it worked in the

[web2py] Re: howto subset a select element

2012-08-14 Thread lucas
ok, what if i have a nested type select field like: db.define_table('class_assignments', Field('class_id', db.classes, requires=IS_IN_DB(db, db.classes.id, '%(class_title)s (%(id)s)'), writable=False, readable=False), Field('lecture_id', db.lectures,

[web2py] Re: howto subset a select element

2012-08-14 Thread Anthony
You can't do that all at once when you respond to the initial request because it depends on user input, so you have to populate the second select via Ajax on the client side once the first selection is made. See

[web2py] Re: Functions in Views

2012-08-14 Thread Pystar
it works in the controller and shell but if I try calling it in the view, it fails silently. On Tuesday, August 14, 2012 7:47:09 PM UTC+1, Anthony wrote: I am having issues calling the prettydate function in my views as its not working, I pull the datetime variable stored in my database and

[web2py] Re: Functions in Views

2012-08-14 Thread Pystar
In my controller, I do this: def index(): rows = db().select(db.post.ALL, orderby=~db.post.timestamp) return locals() In my view I do this: for item in rows: {{=prettydate(item.timestamp)}} it fails

Re: [web2py] Re: Functions in Views

2012-08-14 Thread Bruno Rocha
maybe {{=prettydate(item.timestamp, *T*)}} --

[web2py] Re: Functions in Views

2012-08-14 Thread Anthony
I don't know, but see suggestion herehttps://groups.google.com/d/msg/web2py/Rguuny9E3X8/-a976Tjx4EIJto help diagnose. I don't think it's related to being in the view (as opposed to in the controller). Anthony On Tuesday, August 14, 2012 3:15:19 PM UTC-4, Pystar wrote: In my controller, I do

Re: [web2py] Re: Functions in Views

2012-08-14 Thread Pystar
tried prettydate(item.timestamp, T) still didnt work On Tuesday, August 14, 2012 8:16:39 PM UTC+1, rochacbruno wrote: maybe {{=prettydate(item.timestamp, *T*)}} --

Re: [web2py] Depoying on GAE. Frustration. Followed directions but still getting error.

2012-08-14 Thread Jan-Karel Visser
On GAE at least one language file needs to be present. Could be that one :) Op Tue, 14 Aug 2012 06:52:29 +0200 schreef SeamusSeamus morrisjamespatr...@gmail.com: HI. I followed the directions on the deployment recipe seen here http://web2py.com/books/default/chapter/29/13 I still get:

[web2py] Re: Triggering LOAD

2012-08-14 Thread Rob Goldsmith
That's perfect. Thanks for your help guys. On Monday, 13 August 2012 02:38:17 UTC+1, Anthony wrote: Note, {{=LOAD('default','myaction', ajax=True)}} is just a helper that produces the following HTML: script type=text/javascript!--

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

2012-08-14 Thread Daniel Haag
Am Montag, 13. August 2012 22:32:19 UTC+2 schrieb Niphlod: Ok, done (the save output for TIMEOUTted tasks). That's great! If you want I can test it. Small issue, but quite manageable: when a task timeouts the output now is saved, and you have the traceback to see where it stopped.

[web2py] Earn more money online just by spending two hours online.

2012-08-14 Thread sfi anjana
Earn more money online just by spending two hours online. http://www.sfi4.com/10288668/FREE Buy Products for cheap online http://www.tripleclicks.com/10288668/wave http://www.tripleclicks.com/10288668 Advanced Liquid Nutrition Gateway:

[web2py] webgrid Id key error

2012-08-14 Thread Andre Kozaczka
For a majority of my tables I do not use the default 'id' column. Instead, I explicitly define one with the 'id' keyword. However, I seem to be running into a problem when trying to use webgrid. Whenever I use webgrid with a table that does not have a column named 'Id,' I get the KeyError

[web2py] Re: Electronic voting anybody?

2012-08-14 Thread Rob_McC
Very cool app. I noticed following: 1- Had to add security exception in Firefox browser, https:// when I clicked on https://tests.web2py.com/evote/default/index 2- Is Voted on column suppose to record the date? my is blank 3- When I voted, it said it would send me an email, but I didn't

Re: [web2py] Re: Appengine CPU cycles

2012-08-14 Thread Derek
Would it not be possible to do something like this: if 'db' not in dir(): db = DAL(...) On Monday, August 13, 2012 6:43:34 PM UTC-7, rochacbruno wrote: Thinking again... It could be better if define_my_tables run once on the very first request and table keeps defined forever from

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

2012-08-14 Thread Mike Girard
Salient bits of model at the top of the thread. On Tuesday, August 14, 2012 2:16:56 AM UTC-4, rochacbruno wrote: I guess you can also do: table = TABLE(*[TR(TD(movie.title), TD(UL(*[LI(star.name) for star in * movie.stars.select()*])) for movie in movies]) when a table is referenced by

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

2012-08-14 Thread Mike Girard
This all looks promising. Meanwhile, here's my model with irrelevant Fields omitted and below that my query for the Select. Thanks for the help! A simplified version of my model: db.define_table('movie', Field('title','string'), db.define_table('person', Field('name', 'string',

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

2012-08-14 Thread Niphlod
That's great! If you want I can test it. No problem, that is easy to test and it's working well. I wouldn't consider this an issue, actually it's a feature, isn't it? I'm ok with that if users won't start asking why there is the full traceback instead of the restricted version of it

Re: [web2py] Re: Functions in Views

2012-08-14 Thread Pystar
I just noticed that doing {{=prettydate(request.now, T)}} in my views works, but doing {{=prettydate(item.now, T)}} doesnt work in my views, even when my default value in the database definition is request.now for the timestamp. What exactly am I doing wrong? On Tuesday, August 14, 2012

Re: [web2py] Re: Functions in Views

2012-08-14 Thread Anthony
What error is being raised? What is the type of item.now? On Tuesday, August 14, 2012 6:00:31 PM UTC-4, Pystar wrote: I just noticed that doing {{=prettydate(request.now, T)}} in my views works, but doing {{=prettydate(item.now, T)}} doesnt work in my views, even when my default value in

Re: [web2py] Re: Appengine CPU cycles

2012-08-14 Thread Anthony
Where would you put that? If in a model or controller, won't the condition be true on every request? Anthony On Tuesday, August 14, 2012 4:44:24 PM UTC-4, Derek wrote: Would it not be possible to do something like this: if 'db' not in dir(): db = DAL(...) On Monday, August 13, 2012

Re: [web2py] Re: Functions in Views

2012-08-14 Thread Pystar
item.now is a field in my database whose default value is request.now. So I am confused why {{=prettydate(request.now, T)}} works and {{=prettydate(item.now, T)}} doesnt? Although I am looping through all the returned values from a db select and applying the prettydate function On Tuesday,

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

2012-08-14 Thread howesc
i added a patch against trunk to the ticket. spiffytech - can you see if that works for you? cfh On Monday, August 13, 2012 12:20:02 AM UTC-7, howesc wrote: 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

Re: [web2py] Re: Functions in Views

2012-08-14 Thread Anthony
item.now is a field in my database whose default value is request.now. Yes, I understand, but can you report the error raised as well as checking the type of item.now? Anthony --

[web2py] Grahs

2012-08-14 Thread FERNANDO VILLARROEL
Dear All. I am looking how i can doing some humedity graph from my database like:

Re: [web2py] Re: Functions in Views

2012-08-14 Thread Pystar
It fails silently, it outputs nothing. On Tuesday, August 14, 2012 11:34:54 PM UTC+1, Anthony wrote: item.now is a field in my database whose default value is request.now. Yes, I understand, but can you report the error raised as well as checking the type of item.now? Anthony --

Re: [web2py] Grahs

2012-08-14 Thread Bruno Rocha
If it is a webapp you can start looking here: https://google-developers.appspot.com/chart/interactive/docs/index --

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

2012-08-14 Thread Yarin
Niphlod- has there been any discussion about a param for clearing out old records on the runs and tasks tables? Maybe a retain_results or retain_completed value that specifies a period for which records will be kept? On Thursday, July 12, 2012 4:36:38 PM UTC-4, Niphlod wrote: Hello

Re: [web2py] Re: Install in hostgator

2012-08-14 Thread Tito Garrido
Hi Brian, I tried a similar setup but I wasn't able to run it... Were you able to run web2py in hostgator? When I try to run it from ssh I get: lance...@lancesegols.com [~/public_html/lancesegols.com]# python web2py.py web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2011 Version

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

2012-08-14 Thread niphlod
Nope, that goes wyyy over the scheduler responsibility. Prune all records, prune only completed, prune only failed, requeue timeoutted, prune every day, every hour, etc, etc, etc these are implementation details that belongs to the application. We though that since it is all recorded and

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

2012-08-14 Thread Yarin Kessler
10 4 - thanks On Tue, Aug 14, 2012 at 7:48 PM, niphlod niph...@gmail.com wrote: Nope, that goes wyyy over the scheduler responsibility. Prune all records, prune only completed, prune only failed, requeue timeoutted, prune every day, every hour, etc, etc, etc these are implementation

[web2py] Re: HTTPS and the Rocket server?

2012-08-14 Thread Massimo Di Pierro
yes. Try web2py.py -h for options. you can use -c and -k if you just want https. Of you can use --interfaces if you want both http and https on different ports On Tuesday, 14 August 2012 09:09:38 UTC-5, Alec Taylor wrote: I am testing some authentication mechanisms with janrain locally using

[web2py] Re: What purpose? Search - Edit App Screen - web2py application, v 1.99 and 2.00

2012-08-14 Thread Massimo Di Pierro
Please submit a ticket. I can fix this tonight. On Tuesday, 14 August 2012 11:48:36 UTC-5, Rob_McC wrote: Hey! we're counting how many times you click on it. ;-) . I'm up to 1,222 clicks... * BUT... * When I press ENTER, it WORKS! It is when I press the *magnifying glass,* it

  1   2   >