[web2py] Re: custom built login form

2012-08-14 Thread lyn2py
Maybe you can show us the controller code? The controller needs to have code that looks something like: form=SQLFORM(db.table) if form.process().accepted: response.flash = 'form accepted' elif form.errors: response.flash = 'form has errors' return dict(form=form)

[web2py] Re: editing modules in modules folder

2012-08-14 Thread lyn2py
Modules will persist. Use this code in your controller in development mode :) from gluon.custom_import import track_changes; track_changes(True) On Wednesday, August 15, 2012 1:55:16 PM UTC+8, Janath wrote: > > Hi, > I have kept some subroutines in modules folder of a web2py application. I >

Re: [web2py] Adding hyperlink to response.subtitle?

2012-08-14 Thread Bruno Rocha
response.subtitle = *XML*(T('Aggregator for')+A('Company', _href=' http://company.org/')) *Bruno Cezar Rocha** - @rochacbruno* rochacbr...@gmail.com | Mobile: +55 (11) 99210-8821 www.CursoDePython.com.br | www.rochacbruno.com.br Blog: Open links which points outside your own site in a new window

[web2py] Adding hyperlink to response.subtitle?

2012-08-14 Thread Alec Taylor
In menu.db I tried with: response.subtitle = T('Aggregator for')+A('Company', _href='http://company.org/') And response.subtitle = T('Aggregator for')+'http://company.org/";>Company') But neither rendered the hyperlink, both left me with a subtitle displaying "a href"… How do I add a hyperl

[web2py] [ANNOUNCE] FPDF for python v1.7: unicode ttf support, png alpha channel and more!

2012-08-14 Thread Mariano Reingart
I'm pleased to announce the 1.7 release of FPDF for python (pyfpdf) library, a port of the "Free-PDF" generator originally developed in PHP: https://code.google.com/p/pyfpdf/ Changelog: * added UTF-8 TTF font subset embedding * experimental Py3K compilance * added PNG alpha channel support *

[web2py] Model-less approach should be standadized in web2py in future releases ...

2012-08-14 Thread David Marko
Something like this https://snipt.net/rochacbruno/again-an-approach-to-model-less-in-web2py/ should be standardized in web2py in future releases. There are a few concepts described in this forum but web2py needs some standardized approach integrated into core ... is there any discussion on thi

[web2py] editing modules in modules folder

2012-08-14 Thread Janath
Hi, I have kept some subroutines in modules folder of a web2py application. I have been trying to edit those modules but was unable. Changes doesn't reflect, even when I delete the compiled version from the folder. Is that the way it designed or I am I doing something wrong? Appreciate your res

[web2py] custom built login form

2012-08-14 Thread shartha
Hello, Quick question: Instead of {{=auth.login()}}, I am using the following to be able to customize my login form. However the resulting form does not work and I cannot login with the same username/password that enable me to login if I had used {{=auth.login()}} -- I get the flash error: Inva

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

2012-08-14 Thread Annet
Hi Anthony, > >> Is it possible to put these conditions in a separate function, and call >> that function from every function that needs it? Something like: >> > > Yes, I was going to suggest that. > Yes, coding it the way I did was rather ugly. For now I'll use this solution, after finishing

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

2012-08-14 Thread Annet
Hi Anthony, I meant if "r" does not exist within session -- although "r" exists at the > top level, there is no session.r defined, is there? > No, session[id] is defined, session.r is not. Now I understand why f=r['Nav']['function'] if f: session[id].f=True does work. Thanks for

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

2012-08-14 Thread Massimo Di Pierro
Thanks. fixed. Let me know if there are still problems. On Tuesday, 14 August 2012 21:25:48 UTC-5, Anthony wrote: > > I already submitted a ticket. > > Anthony > > On Tuesday, August 14, 2012 8:44:17 PM UTC-4, Massimo Di Pierro wrote: >> >> Please submit a ticket. I can fix this tonight. >> >> On

[web2py] Monitoring scheduler with supervisord

2012-08-14 Thread Yarin
I'm trying to use supervisord to monitor scheduler workers. My supervisord.conf file: [program:my_scheduler] command={my_site_path}/web2py/web2py.py -K my_app When I launch supervisord, a worker shows up in the scheduler. However, when I compare the listed pid in the supervisord console, it doe

Re: [web2py] Re: client-side validation plugin

2012-08-14 Thread Alec Taylor
Thanks a heap Franco :) The only suggestion I have is to add the `IS_MATCH` validator On Wed, Aug 15, 2012 at 11:12 AM, Franco wrote: > Ups, I made a double post. Anyway if there are any interested, here is an > example of use: > > def validation(): > > > > from plugin_ValidationEngine impo

[web2py] Re: howto subset a select element

2012-08-14 Thread Anthony
IS_EMPTY_OR(IS_IN_DB(db, db.lecture_items.id, '%(title)s (%(id)s)')) Anthony On Tuesday, August 14, 2012 10:59:42 PM UTC-4, lucas wrote: > > ok, moving along, > > what if i want the option of allowing the user to leave: >... >Field('lecture_item_id', db.lecture_items, requires=IS_IN_DB(db

[web2py] Re: howto subset a select element

2012-08-14 Thread lucas
ok, moving along, what if i want the option of allowing the user to leave: ... Field('lecture_item_id', db.lecture_items, requires=IS_IN_DB(db, db.lecture_items.id, '%(title)s (%(id)s)')), ... blank. meaning, if the user choses it in the select element, fine, it should be in the refer

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

2012-08-14 Thread Anthony
I already submitted a ticket. Anthony On Tuesday, August 14, 2012 8:44:17 PM UTC-4, Massimo Di Pierro wrote: > > 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. ;-) >> .

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

2012-08-14 Thread spiffytech
Yep, that fixes it! Thanks for your work on that! On Tuesday, August 14, 2012 6:18:29 PM UTC-4, howesc wrote: > > 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 sp

[web2py] Re: client-side validation plugin

2012-08-14 Thread Franco
Ups, I made a double post. Anyway if there are any interested, here is an example of use: def validation(): from plugin_ValidationEngine import JsSQLFORM f = JsSQLFORM.factory( Field('first_name', requires = [IS_NOT_EMPTY(), IS_LENGTH(20, 3)],label = 'First Name'),

[web2py] Re: Electronic voting anybody?

2012-08-14 Thread Massimo Di Pierro
I rewrote most of the logic and I am posting a new version tonight. Please check again tomorrow. On Tuesday, 14 August 2012 15:14:29 UTC-5, Rob_McC wrote: > > Very cool app. > > I noticed following: > > 1- Had to add security exception in Firefox browser, https:// when I > clicked on > https://t

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

2012-08-14 Thread Massimo Di Pierro
I opened an issue about this. On Tuesday, 14 August 2012 12:52:52 UTC-5, Alec Taylor wrote: > > 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 exam

Re: [web2py] Re: Functions in Views

2012-08-14 Thread Pystar
OK, After doing type(item.now). I discovered that web2py is escaping my retrieved data from the database and converting everything into strings. And since prettydate() doesnt work on strings but datetime objects, it fails. For this prettydate to work in the views, I would have to import datetim

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

2012-08-14 Thread Massimo Di Pierro
If you have a proposal for a change now is the time. web2py 2.0 approaching fast On Tuesday, 14 August 2012 11:48:41 UTC-5, Jonathan Lundell wrote: > > On 14 Aug 2012, at 9:33 AM, Anthony > > wrote: > > It's maybe worth pointing out that these validators should be imposed only >> when regis

[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 gl

[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

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 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 details > that

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: 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

[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 everybod

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 --

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 >

[web2py] Grahs

2012-08-14 Thread FERNANDO VILLARROEL
Dear All. I am looking how i can doing some humedity graph from my database like: http://www.google.cl/imgres?imgurl=http://bfinet.es/objects/300_19_1511558087/grafico-humedad.jpg&imgrefurl=http://bfinet.es/Sonda%2BTemperatura%2By%2BHumedad-300.htm?sid%3D86888e016e7af58b05e6bd8071640e45&h=395&w=6

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] 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 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, Augu

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

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: 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 8:32:18

[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

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', uni

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

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 f

[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'

[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 ex

[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: http://www.tripleclicks.com/detail.php?item=5169/1028866

[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 sto

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 : HI. I followed the directions on the deployment recipe seen here http://web2py.com/books/default/chapter/29/13 I still get: Internal error Ticket issued:

[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: > > loadin

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*)}} > --

[web2py] Re: Functions in Views

2012-08-14 Thread Anthony
I don't know, but see suggestion hereto 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

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 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 quie

[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 a

[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 here

[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, requires=IS_IN_DB(db(db.lectures.user

[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: 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 d

[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

[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 t

[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

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

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 imple

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 wrote: > 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

[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

[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: 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

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, Au

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 wrote: > Sorry, the DB was still static. Just created a init_db() and worked as > spected. > > > On Tue, Au

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 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 > an attacker. (O

[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: 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 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: > >> Now I'm getti

[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 Questio

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 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"-- > is it just a m

[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 r['Nav']['id']==A

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 us

[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

[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

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

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, A

[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 un

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 wrote: > 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

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 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 out that these

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 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, or >JOH

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] 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

[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: auth.settings.r

[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: 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 http://127.0.0.1:8000/bootstrap/calendar/even

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 > > -- > > > > --

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] 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(.)

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

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 wrote: > HI. > I followed the directions on the deployment recipe seen here > http://web2py.com/books/default/chapter/29/13 > > I still get: > > Internal error > > Ticket is

[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] 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 --

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 wrote: > auth,messages.verify_email = ('Here I put my very long html code' > 'I can write texts ' > 'I can put a tutorial ' > 'I

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 wrote: > modules/web2py/auth.py: >> >> auth = Auth(db, hmac_key=Auth.get_or_create_**key()) >> > > Where does that db object come from? Note, global

[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 requ

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" escreveu: > I have a few fields that have "compute" attribute defined. I've only > inserted the records via script - c

[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 cl

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' >

  1   2   >