[web2py] Please configure default branch for web2py on Launchpad

2010-08-14 Thread Tim McNamara
Massimo, I know that the primary development of web2py uses hg, however a small change to the web2py launchpad project would make it easier to install with bzr. Please assign the lp:~mdipierro/web2py/devel branch as the default branch. This means that people will be able to type: bzr branch l

[web2py] Re: Behaviour of extend/layouts changed in 1.82.1?

2010-08-14 Thread Paul Gerrard
Heres my solution - works a treat: #Controller.py if request.vars.get('printMode', None): response.layout = 'layoutPrint.html' printMode=True else: response.layout = 'layout.html' printMode=False # all views {{extend response.layout}} I use the printMode Boolean to detemine whet

[web2py] Re: Problem with IS_STRONG() and CRYPT() methods

2010-08-14 Thread mdipierro
this confirms that crypt is working. somehow it is not being called for you. I am very puzzled by this. How do you check the passwords are not hashed? Can you make a minimalist app to reproduce the problem and and email it to me? On Aug 13, 6:39 pm, elfuego1 wrote: > Requirements for password fie

[web2py] Looking for suggestions with a few ideas...

2010-08-14 Thread mart
Hi all, First day here and hoping to be able to pick the collective brain, if I can. But before I ask, I do have to say that I am absolutely enjoying my experience with web2py, and think that it is without a doubt an outstanding platform! - being a python junky, does make me bias, but regardless,

[web2py] Re: PAPERBACK web2py book

2010-08-14 Thread mart
I referred to the online 2nd edition many times while trying to familiarize my self with both web2py and the world of web apps. (I'm more of a "VIM and fresh pot of coffee" type of developer). I read through the deployment Recipes, which was often enough a struggle for me (being less of a web guy)

[web2py] Re: Looking for suggestions with a few ideas...

2010-08-14 Thread mdipierro
This is not a problem. Say you have def index(): return dict() def mydata(): row=db(db.mytable.id>0).select() return dict(row=row) you can access the latter from the former via ajax with a timer as a component. # view index.html {{extend 'layout.html'}} function load_mydata

[web2py] Re: PAPERBACK web2py book

2010-08-14 Thread mdipierro
You can download the Table of Contents here: http://web2py.com/book/static/web2py_manual_toc.pdf and here is a complete chapter 3: http://web2py.com/book/static/web2py_manual_chap03.pdf Massimo On Aug 13, 5:36 pm, mdipierro wrote: > The 3rd edition of the book is finally available in p

[web2py] Re: Problem with IS_STRONG() and CRYPT() methods

2010-08-14 Thread elfuego1
When I look into database I can see the password in a readable form. No hash there. I tested registration on a standard cookbook application and the hash there works for password field. So I started thinking what am I doing wrong. And then it stuck me and I think I found the problem. When I was se

[web2py] Re: Problem with IS_STRONG() and CRYPT() methods

2010-08-14 Thread mdipierro
You have two problems: 1) insert(request.vars.password...) should be insert(...form.vars.password...) request.vars contains the raw data sent from user, form.vars contains the same data filtered by validators. 2) you are bypassing a lot of login that is normally performed by auth. For exam

[web2py] Re: Not able to embed audio files in web2py

2010-08-14 Thread titan
Actually I can download this file if I set the content-disposition tag in the http header , but I am not able to stream the file on the browser , although I can stream mp3 files from other sites on my browser. My browser tries to stream this file but gives an error "Could not open location; you mi

[web2py] Re: Not able to embed audio files in web2py

2010-08-14 Thread mdipierro
Please zip your app and send it to me. Hard to debug without looking at it. Massimo On Aug 14, 4:51 am, titan wrote: > Actually I can download this file if I set the content-disposition tag > in the http header , > but I am not able to stream the file on the browser , although I can > stream mp

[web2py] Re: Problem with IS_STRONG() and CRYPT() methods

2010-08-14 Thread elfuego1
OK. Then can you PLEASE tell me how should I write registration part to use full power of the framework? In controllers/default.py I have my custom form in def register(). I invoke it in views/default/register.html with: {{=form}} HOW DO I SAVE IT TO DATABASE??? I just need this information and

[web2py] Re: Problem with IS_STRONG() and CRYPT() methods

2010-08-14 Thread mdipierro
In the controller you should ONLY use form=auth.register() DO NOT make the registration form with FORM, SQLFORM, accepts, etc. If you need to add fields, define your own db.auth_user table If you need to customize presentation use {{=form.custom.begin}} {{=form.custom.widget.first_name}}

[web2py] Re: is it possible to pass string "C++" as URL argument?

2010-08-14 Thread Jurgis Pralgauskis
On Aug 5, 3:41 pm, mdipierro wrote: > the problem is not the escaping (which is correct, + must be escaped) > the problem is thta web2py urls do not allow non-alphanumeric chars. but for arguments there seems to be no need for such restriction, or is there? maybe exception could be mate for "%

[web2py] Re: Problem with IS_STRONG() and CRYPT() methods

2010-08-14 Thread elfuego1
In user.html I have now: {{if request.args(0)=='login':}}{{=auth.login()}} {{elif request.args(0)=='register':}} {{=form.custom.begin}} {{=form.custom.widget.first_name}} ... {{=form.custom.widget.submit}} {{=form.custom.end}} I have a submit button only on login page (which is generated automat

[web2py] Re: Problem with IS_STRONG() and CRYPT() methods

2010-08-14 Thread elfuego1
How do I fix that? On 14 Sie, 15:01, elfuego1 wrote: > In user.html I have now: > > {{if request.args(0)=='login':}}{{=auth.login()}} > > {{elif request.args(0)=='register':}} > {{=form.custom.begin}} > {{=form.custom.widget.first_name}} > ... > {{=form.custom.widget.submit}} > {{=form.custom.end

[web2py] Re: is it possible to pass string "C++" as URL argument?

2010-08-14 Thread mdipierro
On Aug 14, 5:55 am, Jurgis Pralgauskis wrote: > On Aug 5, 3:41 pm, mdipierro wrote: > > > the problem is not the escaping (which is correct, + must be escaped) > > the problem is thta web2py urls do not allow non-alphanumeric chars. > > but for arguments there seems to be no need for such restr

[web2py] Re: Problem with IS_STRONG() and CRYPT() methods

2010-08-14 Thread mdipierro
My mistake. It is {{=form.custom.submit}} not {{=form.custom.widget.submit}} On Aug 14, 8:02 am, elfuego1 wrote: > How do I fix that? > > On 14 Sie, 15:01, elfuego1 wrote: > > > In user.html I have now: > > > {{if request.args(0)=='login':}}{{=auth.login()}} > > > {{elif request.args(0)=='regi

[web2py] Re: WOW!!

2010-08-14 Thread david.waldrop
Is there a way to test this in a dev environment using localhost??? The db portion works fine, the url is what I cannot test locally. I have read the forums and see comeone else did this with a wiki by using routes, but i do not fully understand. Scenario: user is email link of "http://mycommuni

[web2py] Re: Problem with IS_STRONG() and CRYPT() methods

2010-08-14 Thread elfuego1
I can't send data from registration form to DB. I'm stuck on the same page. I'm not redirected to post registration page. Only fields password and verify password are being cleaned. Looks like registration form is not working. Is there a way you could look at my application so I would move on with

[web2py] Educational web app in web2py

2010-08-14 Thread ondrejs
Is anybody interested in collaborating on an education project being developed in web2py? I have started working on it, but I could use help as I have quite a few other things going. You can find the project synopsis on this web page: http://www.savbb.sk/~ondrejs/Drill2.html First two issues I w

[web2py] Re: Running web2py and lighttpd in remote server.

2010-08-14 Thread John Heenan
Hi Wafto Try replacing line ".fcgi" => ( with line "/handler_web2py.fcgi" => ( You can find more information at http://www.web2pyslices.com/main/slices/take_slice/57 If this does not work then please let us know what the server error log says. John Heenan On Aug 14

[web2py] Re: Problem with IS_STRONG() and CRYPT() methods

2010-08-14 Thread mdipierro
Please email it to me. On Aug 14, 8:30 am, elfuego1 wrote: > I can't send data from registration form to DB. I'm stuck on the same > page. I'm not redirected to post registration page. Only fields > password and verify password are being cleaned. Looks like > registration form is not working. > >

[web2py] problem with represent

2010-08-14 Thread tiffany
i have declared my database as, db.define_table('song', SQLField('name','string',requires=IS_NOT_EMPTY(),label='Name of the Song'), SQLField('album_id',db.album,label='Album',requires=IS_IN_DB(db,'album.id','% (name)s')), SQLField('genre',db.Genre,label='Genre',requires=IS_IN_DB(db,'Genre.id

[web2py] Re: blocks included displayed twice.

2010-08-14 Thread Lionel Barret
I am following you and I suspected something like this. Although I was expecting either to work or to send an error. The general quality of web2py made be complacent, I suppose. About your question, as a user, I would consider that if I respect the order of declaration (blocks from the extending v

[web2py] Re: Educational web app in web2py

2010-08-14 Thread mdipierro
For my class last quarter I made a system like you suggest although with differences. I will cleanup, and post it if there is interest. The idea was the following: - The system is based on a early version plugin wiki. Everything is a wiki. - The teacher creates a class by creating a new wiki pag

[web2py] Re: problem with represent

2010-08-14 Thread mdipierro
1) please use Field and not SQLFIeld (deprecated) 2) represent is called automatically only by SQLTABLE and crud.read and crud.update. You have to call it explicitly in every other circumstance. Massimo On Aug 14, 9:02 am, tiffany wrote: > i have declared my database as, > > db.define_table('so

[web2py] Re: Problem with IS_STRONG() and CRYPT() methods

2010-08-14 Thread elfuego1
I did as you asked. Message should be at your email box. On 14 Sie, 15:55, mdipierro wrote: > Please email it to me. > > On Aug 14, 8:30 am, elfuego1 wrote: > > > I can't send data from registration form to DB. I'm stuck on the same > > page. I'm not redirected to post registration page. Only f

[web2py] Re: PAPERBACK web2py book

2010-08-14 Thread mart
Thank you! much appreciated :) As a side note: Not sure if any one has considered this, but there is a pedagogical side web2py for the young (i mean like the 8 year crowd). Kids are so smart today it seems... My 8 y.o. daughter is thoroughly taken be this as well. I mean a great framework built

[web2py] Re: Problem with IS_STRONG() and CRYPT() methods

2010-08-14 Thread mdipierro
This: {{if form.errors.password2:}}NO MATCH{{pass}} Should have been: {{if form.errors.password_two:}}NO MATCH{{pass}} Make the change and it will work. There should really be a form.custom.widget.password_two... I will think about adding one. Massimo On Aug 14, 9:49 am, elfuego1 wrote: > I

[web2py] Re: PAPERBACK web2py book

2010-08-14 Thread mdipierro
Interesting idea. I agree. Let's think about how to do this. Massimo On Aug 14, 9:51 am, mart wrote: > Thank you! much appreciated :) > > As a side note: Not sure if any one has considered this, but there is > a pedagogical side web2py for the young (i mean like the 8 year > crowd).  Kids are so

[web2py] Re: Looking for suggestions with a few ideas...

2010-08-14 Thread mart
HA! yes, I see it!!! :) Fabulous! THANK YOU! Now, a little look into eventListeners and handlers and things are well on their way! Thanks for the reply! Mart :) On Aug 14, 4:36 am, mdipierro wrote: > This is not a problem. Say you have > > def index(): >       return dict() > > def mydata(): >

Re: [web2py] Re: is it possible to pass string "C++" as URL argument?

2010-08-14 Thread Jonathan Lundell
On Aug 14, 2010, at 6:10 AM, mdipierro wrote: > On Aug 14, 5:55 am, Jurgis Pralgauskis > wrote: >> On Aug 5, 3:41 pm, mdipierro wrote: >> >>> the problem is not the escaping (which is correct, + must be escaped) >>> the problem is thta web2py urls do not allow non-alphanumeric chars. >> >> but

[web2py] jqGrid and checkboxe

2010-08-14 Thread Kenneth
Hello, is there somebody out there that knows and maybe have examples on how to use checkboxes with jqGrid? I would like to have one checkbox per row and when pressing Submit it would do some action on selected rows. Is it possible to have three submit buttons that preforms different actions on

[web2py] append position

2010-08-14 Thread Francisco Costa
Hello! is there any way you can append a value to the first position? I have this for num in all_updates: session.updates.append(num) but I want what i already have in the session.updates to appear last Thanks

[web2py] Re: is it possible to pass string "C++" as URL argument?

2010-08-14 Thread mdipierro
perhaps app level regex validation config? On Aug 14, 11:04 am, Jonathan Lundell wrote: > On Aug 14, 2010, at 6:10 AM, mdipierro wrote: > > > > > On Aug 14, 5:55 am, Jurgis Pralgauskis > > wrote: > >> On Aug 5, 3:41 pm, mdipierro wrote: > > >>> the problem is not the escaping (which is correct,

[web2py] Re: append position

2010-08-14 Thread mdipierro
for num in all_updates: session.updates.insert(0,num) or session.updates=[num for num in all_updates]+session.get(updates,[]) On Aug 14, 12:49 pm, Francisco Costa wrote: > Hello! > is there any way you can append a value to the first position? > > I have this > >             for

[web2py] Re: append position

2010-08-14 Thread Francisco Costa
I've managed to use for num in all_updates:                session.updates.insert(0,num) Avé Massimo

[web2py] Re: jqGrid and checkboxe

2010-08-14 Thread John Heenan
On Aug 15, 3:32 am, Kenneth wrote: > Hello, > > is there somebody out there that knows and maybe have examples on how > to use checkboxes with jqGrid? > > I would like to have one checkbox per row and when pressing Submit it > would do some action on selected rows. > > Is it possible to have three

Re: [web2py] Re: is it possible to pass string "C++" as URL argument?

2010-08-14 Thread Jonathan Lundell
On Aug 14, 2010, at 10:53 AM, mdipierro wrote: > perhaps app level regex validation config? We need to first do standards-based URL parsing and decoding, and then apply validation as a subsequent step. One option would be to accept anything that's legal in a URL; the app would do its own valid

[web2py] Re: Problem with IS_STRONG() and CRYPT() methods

2010-08-14 Thread elfuego1
It works Thank YOU SO MUCH!!! On 14 Sie, 17:20, mdipierro wrote: > This: > > name="password2" type="password" value="" />{{if > form.errors.password2:}}NO MATCH{{pass}} input> > > Should have been: > > name="password_two" type="password" value="" />{{if > form.errors.password_two:}}NO MATC

[web2py] book: typo + proposal

2010-08-14 Thread Jurgis Pralgauskis
1) at http://web2py.com/book/default/chapter/06#orderby,-groupby,-limitby,-distinct there's said: You can fetch the records sorted by name in reverse order (**notice the tilde**): >>> for row in db().select(db.person.ALL, orderby=db.person.name): print row.name , but I don't see the til

[web2py] post-insert processing

2010-08-14 Thread VP
I have one table called "category", and another table called "post". When a new post is inserted, I want to increment "count" (an attribute of category) of the appropriate category. Unfortunately, I don't know how to access the post object right after it is inserted to find out which category was

[web2py] Host2Py - web2py simple file hosting

2010-08-14 Thread Lasiaf
Hi again, for my 3rd app it's file hosting. Very simple application to host files. You can download it in here http://code.google.com/p/host2py/ also you can see it live here http://host2py.appspot.com This is mostly for private hosting of small files, but it is designed so that you can add permi

[web2py] Re: WikiYou - Showcase

2010-08-14 Thread Lasiaf
No, its not opensource. On Aug 13, 12:56 pm, Bruno Rocha wrote: > Thats opensource? > > 2010/8/13 Lasiaf > > > > > > > maybe when you tried it, the version I uploaded was the one with > > invalid routes(maybe development mode). > > I can't think of any reason why would it fail. Also can you answ

[web2py] Re: post-insert processing

2010-08-14 Thread Jose
On 14 ago, 19:18, VP wrote: > I have one table called "category", and another table called "post". > When a new post is inserted, I want to increment "count" (an attribute > of category) of the appropriate category. > > Unfortunately, I don't know how to access the post object right after > it i

Re: [web2py] Re: blocks included displayed twice.

2010-08-14 Thread Thadeus Burgess
You also have the ability to call {{super}} or {{super block}} to include the contents of a parent block. Personally, I use them all the time now. -- Thadeus On Sat, Aug 14, 2010 at 9:09 AM, Lionel Barret wrote: > t to downplay the work done. Other may find it > useful. And it is an impress

Re: [web2py] Re: Behaviour of extend/layouts changed in 1.82.1?

2010-08-14 Thread Thadeus Burgess
awesome =0 -- Thadeus On Sat, Aug 14, 2010 at 2:58 AM, Paul Gerrard wrote: > Heres my solution - works a treat: > > #Controller.py > if request.vars.get('printMode', None): >    response.layout = 'layoutPrint.html' >    printMode=True > else: >    response.layout = 'layout.html' >    printMod

[web2py] How to declare a field default value from the same table/form

2010-08-14 Thread Bruno Rocha
I need a page slug for the cars in my car shop, instead having http://.../default/car/2, I want http:///default/car/carbrand-carmodel-caryear-id so I defined a table: db.define_table('car' Field('brand', db.brand), Field('model'),

[web2py] Re: book: typo + proposal

2010-08-14 Thread mdipierro
Thanks. I will see if I can revised. On Aug 14, 4:11 pm, Jurgis Pralgauskis wrote: > 1) athttp://web2py.com/book/default/chapter/06#orderby,-groupby,-limitby,-... > there's said: > > You can fetch the records sorted by name in reverse order (**notice > the tilde**): > > >>> for row in db().select

[web2py] development mode for web2py?

2010-08-14 Thread firedragon852
I am doing development under windows so I am running the binary version of web2py for windows. It seems that whenever I change my code I need to clean/compile via the admin interface for the changes to be effective. Is there a way to turn this off? During development I want to be able to make ch

[web2py] Re: Host2Py - web2py simple file hosting

2010-08-14 Thread mdipierro
Please add it to http://web2py.com/appliances On Aug 14, 5:34 pm, Lasiaf wrote: > Hi again, for my 3rd app it's file hosting. Very simple application to > host files. > You can download it in herehttp://code.google.com/p/host2py/ > > also you can see it live herehttp://host2py.appspot.com > > Thi

Re: [web2py] Problems with GAE auth :(

2010-08-14 Thread Fabio Alessandro Locati
Thanks Bruno for the solution :) 2010/8/11, Bruno Rocha : > PLUS: If you need an example on how to auth with gmail account, > look at pyforum source code: http://pyforum.org/ > > > > 2010/8/10 Fale > >> Hi, >> I'm a new web2py user :) >> I'm trying to use google's auth for my app, but it does no

[web2py] Re: How to declare a field default value from the same table/form

2010-08-14 Thread mdipierro
import re slug_regex = re.compile('[^\w-]') Field('slug',compute=lambda r: slug_regex.sub('','%(brand)s-%(model)s-% (year)s' %r).lower()) On Aug 14, 11:12 pm, Bruno Rocha wrote: > I need a page slug for the cars in my car shop, > instead havinghttp://.../default/car/2, > I wanthttp:///defaul

[web2py] Re: How to declare a field default value from the same table/form

2010-08-14 Thread mdipierro
... and make is writable=False, readable=False On Aug 15, 1:07 am, mdipierro wrote: > import re > slug_regex = re.compile('[^\w-]') > > Field('slug',compute=lambda r: slug_regex.sub('','%(brand)s-%(model)s-% > (year)s' %r).lower()) > > On Aug 14, 11:12 pm, Bruno Rocha wrote: > > > I need a page

Re: [web2py] Educational web app in web2py

2010-08-14 Thread Fabio Alessandro Locati
I was also starting a project like this... If Massimo could release something it would be awesome :) 2010/8/14, mdipierro : > For my class last quarter I made a system like you suggest although > with differences. I will cleanup, and post it if there is interest. > > The idea was the following: >

[web2py] Re: development mode for web2py?

2010-08-14 Thread mdipierro
You do not need to compile your application ever. You only compile your app when you want to lock it and ship it in closed source format. The compilation step is not required for your app to work. if you do not compile it your changes will be reflected immediately. Massimo On Aug 14, 8:02 pm,