[web2py] how to include profile photo from Janrain in auth_user?

2011-06-10 Thread Luis Goncalves
I have Janrain working as a login method (thanks to the instructions in the web2py manual, and sample code in default app). I'd like to include the profile photo (that, say, facebook provides via janrain) as part of the user profile. I had my own function based on the sample code at the

[web2py] Re: attribute content of meta tag viewport in layout.html (Welcome) should use comma separator

2011-06-10 Thread Nico de Groot
I've put this patch in web2py google code

[web2py] how to write if else in controller in web2py

2011-06-10 Thread anil manikyam
def login(): if db((db.table1.username)== request.vars.visitor_name).select(): redirect(URL('index')) else: print 'invalid statement' return dict() in this username and visitor_name are compared if correct redirect to index page it is work very well but if those are

[web2py] anil manikyam wants to chat

2011-06-10 Thread anil manikyam
--- anil manikyam wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-10d5f122fd-0ddf7cb181-wBuQFmlID7kV5jUKC1Oy_058qmo You'll

[web2py] Re: Validator: one of several fields must be non-empty

2011-06-10 Thread David Marko
This(or some modofication) could be part of web2py core, I think its quite general purpose validator ... David

[web2py] IS_IN_SET validator not working as expected

2011-06-10 Thread selecta
i have the model db.define_table( 'foobar', Field('open', 'boolean', requires = IS_IN_SET([(True, 'open'), (False, 'closed')], zero = None), default = True, widget=SQLFORM.widgets.radio.widget), ) and the controller def edit(): return crud.update(db.foobar, request.args(0), deletable =

Re: [web2py] how to write if else in controller in web2py

2011-06-10 Thread Bruno Rocha
Are you expecting the print on shell right? there are no message printed to console? Are you using mod_wsgi or running on rocket server? (mod_wsgi does not works well with stdout(print)) If, do you expect the output in to browser, it is better to use a specific view for handle the message or

[web2py] Re: nginx and web2py

2011-06-10 Thread cjrh
On Jun 9, 10:34 pm, peter peterchutchin...@gmail.com wrote: I am trying to get web2py going with nginx on a remote server. When I try running it via uswgi and nginx, using wsgihandler.py, it The VPS uses Centos 5.5, and I am running things on python2.6.1, web2py version 1.96.3 I am running

[web2py] Re: Web2Py RoR performances

2011-06-10 Thread cjrh
pypy changes these kinds of discussions. In a disruptive sense.

[web2py] Re: Web2Py RoR performances

2011-06-10 Thread cjrh
On Thursday, 9 June 2011 15:40:14 UTC+2, Alexandre Strzelewicz wrote: Is Ruby on Rails faster than Web2py ? Here are a few *really *important points about speed: 1. Speed is not the same as *concurrency*. On the web, generally (depending on your application), it is the latter that

Re: [web2py] Re: New Features in Book

2011-06-10 Thread cjrh
On Thursday, 9 June 2011 14:00:37 UTC+2, Martin.Mulone wrote: I proposed to massimo some ideas and improvements, regarding to this. Would you be willing for forward those to me also, or would you prefer to keep those private for now? One suggestion I made a while ago was to appoint (or

Re: [web2py] Re: New Features in Book

2011-06-10 Thread anil manikyam
how i will send a mail to others using web2py

Re: [web2py] Re: nginx and web2py

2011-06-10 Thread anil manikyam
how i will send mail to others using web2py -- @n!l m@n!ky@m

Re: [web2py] how to include profile photo from Janrain in auth_user?

2011-06-10 Thread anil manikyam
i will i will send mail to other people using web2py -- @n!l m@n!ky@m

[web2py] Re: nginx and web2py

2011-06-10 Thread JorgeH
Cool Goood to know BTW, what was the setup guide you say you followed?

Re: [web2py] Re: import error debian package

2011-06-10 Thread José Luis Redrejo Rodríguez
2011/6/9 Stavros stavros32...@gmail.com: http://dl.dropbox.com/u/3616407/mathquiz.tar.gz Thanks Thanks for the testing project. Checking it I've noticed there was a missing (and important file now) : applications/__init__.py I've just fixed it and uploaded a new version (1.96.4-2) of the

Re: [web2py] Re: New Features in Book

2011-06-10 Thread Caleb Hattingh
On 10 June 2011 12:47, anil manikyam anilmanikya...@gmail.com wrote: how i will send a mail to others using web2py Just post on the web2py Google Group.

[web2py] Re: IS_IN_SET validator not working as expected

2011-06-10 Thread Ross Peoples
I'm sure you've already considered this, but maybe use a checkbox instead, as it's specifically designed to handle true/false. The SELECT widget and associated IS_IN_SET is designed to return a string value. So If you really want to use a select box for this instead of a checkbox, then you need

[web2py] Re: how to write if else in controller in web2py

2011-06-10 Thread Philip
To expand on the first answer, if you want something to appear in the browser, you need to return a value to the view. For example else: msg = 'invalid statement' return dict(display_string=msg) The generic view will show the display_string (you can name the variable anything you want,

Re: [web2py] Re: how to write if else in controller in web2py

2011-06-10 Thread anil manikyam
def login(): if db((db.table1.username)== request.vars.visitor_name).select(): redirect(URL('index')) else: msg='invalid syntax' return dict(display_msg=msg) form input name=visitor_name / input type=submit / {{= /form {{=display_string}} i tried it but when

Re: [web2py] Re: nginx and web2py

2011-06-10 Thread anil manikyam
def login(): if db((db.table1.username)== request.vars.visitor_name).select(): redirect(URL('index')) else: msg='invalid syntax' return dict(display_msg=msg) form input name=visitor_name / input type=submit / {{= /form {{=display_string}} i tried it but when

Re: [web2py] Re: db.define_tables

2011-06-10 Thread anil manikyam
def login(): if db((db.table1.username)== request.vars.visitor_name).select(): redirect(URL('index')) else: msg='invalid syntax' return dict(display_msg=msg) form input name=visitor_name / input type=submit / {{= /form {{=display_string}} i tried it but when

Re: [web2py] how to write if else in controller in web2py

2011-06-10 Thread anil manikyam
def login(): if db((db.table1.username)== request.vars.visitor_name).select(): redirect(URL('index')) else: msg='invalid syntax' return dict(display_msg=msg) form input name=visitor_name / input type=submit / {{= /form {{=display_string}} i tried it but when

Re: [web2py] Re: nginx and web2py

2011-06-10 Thread Anthony
See http://web2py.com/book/default/chapter/08#Auth-and-Mail On Friday, June 10, 2011 6:49:07 AM UTC-4, anil manikyam wrote: how i will send mail to others using web2py -- @n!l m@n!ky@m

Re: [web2py] Re: how to write if else in controller in web2py

2011-06-10 Thread Anthony
On Friday, June 10, 2011 9:22:11 AM UTC-4, anil manikyam wrote: form input name=visitor_name / input type=submit / {{=--- What's this for? Try deleting this line. /form {{=display_string}} Also, please do not post the same message multiple times. Thank you.

[web2py] Change layout of CRUD forms

2011-06-10 Thread Jim Steil
Hi I'm looking for a way to modify the presentation of a CRUD form. Specifically I want the following: Name:INPUT_FIELD_FOR_FIRST_NAME INPUT_FIELD_FOR_LAST_NAME Address: INPUT_FIELD_FOR_ADDRESS City/State/ZIP: INPUT_FIELD_FOR_CITY, INPUT_FIELD_FOR_STATE, INPUT_FIELD_FOR_ZIP I've

[web2py] Re: Change layout of CRUD forms

2011-06-10 Thread Anthony
Have you tried the method described here: http://web2py.com/book/default/chapter/07#Custom-forms? You can also create custom widgets, but I don't think you'd need to in this case. And you can also do some form customization via server-side DOM parsing (

Re: [web2py] Re: Change layout of CRUD forms

2011-06-10 Thread Jim Steil
Thanks, that's exactly what I missed going through the book. I'll work through this and see what I can come up with. -Jim On 6/10/2011 9:21 AM, Anthony wrote: Have you tried the method described here: http://web2py.com/book/default/chapter/07#Custom-forms? You can also create custom

[web2py] Re: LOAD with ajax=False fails to pass vars

2011-06-10 Thread apple
This does not seem to work for me even with ajax_trap=True. On May 12, 7:24 pm, pbreit pbreitenb...@gmail.com wrote: Still didn't work in trunk. ajax_trap=True makes it work. But that shouldn't be necessary, correct?

[web2py] Re: LOAD with ajax=False fails to pass vars

2011-06-10 Thread Anthony
Can you show your code? On Friday, June 10, 2011 10:53:50 AM UTC-4, apple wrote: This does not seem to work for me even with ajax_trap=True. On May 12, 7:24 pm, pbreit pbreit...@gmail.com wrote: Still didn't work in trunk. ajax_trap=True makes it work. But that shouldn't be necessary,

[web2py] limitby not working

2011-06-10 Thread Junaid P V
Hi, I have a database of lamps, I was trying to show paginated records from lamps table. I could not find limitby working. My code is: lamps = db().select(db.lamps.ALL, limitby=(offset, limit)) But, I get records only in the rage 0 to limit starting from offset To clarify, if I have 7

[web2py] Re: import error debian package

2011-06-10 Thread Stavros
Thank you. That worked wonderfully. I'll test out the package when it's available. On Jun 10, 8:08 am, José Luis Redrejo Rodríguez jredr...@debian.org wrote: 2011/6/9 Stavros stavros32...@gmail.com: http://dl.dropbox.com/u/3616407/mathquiz.tar.gz Thanks Thanks for the testing project.  

[web2py] Re: limitby not working

2011-06-10 Thread Massimo Di Pierro
limitby=(a,b) gives you records with a=numberb, NOT a=numbera+b. In other words, b is not the SQL LIMIT value. You can do lamps = db().select(db.lamps.ALL, limitby=(offset, offset+limit)) On Jun 10, 10:28 am, Junaid P V junu...@gmail.com wrote: Hi, I have a database of lamps, I was trying

[web2py] Re: limitby not working

2011-06-10 Thread Junaid P V
Thank you Massimo :) I was thinking in SQL

[web2py] Anyone interested in an AJAX version of CRUD?

2011-06-10 Thread Ross Peoples
For the last month or so, I have been working on a plugin that does something similar to CRUD, except that it's all AJAX and provides a couple of nice features for editing things. Obviously, it doesn't work exactly like CRUD, since I've never really looked at the code for it, but I wanted

[web2py] Re: nginx and web2py

2011-06-10 Thread peter
Thanks. I had already made cache and the files within writeable by all. I tried making the directories of web2py writeable to all, to no benefit, so I rather drastically made everything within my application writeable by all. This did sort out the problem. I probably ought to go back now and

[web2py] Re: Anyone interested in an AJAX version of CRUD?

2011-06-10 Thread Massimo Di Pierro
I am in love. I look forward to you releasing the source code. On Jun 10, 1:02 pm, Ross Peoples ross.peop...@gmail.com wrote: For the last month or so, I have been working on a plugin that does something similar to CRUD, except that it's all AJAX and provides a couple of nice features for

Re: [web2py] Re: Auth_user ondelete

2011-06-10 Thread Thiago Carvalho D' Ávila
It worked out, thanks! Thread closed. 2011/6/9 Anthony abasta...@gmail.com On Thursday, June 9, 2011 6:59:34 PM UTC-4, Thiago wrote: I have this auth_user table, and another table called activities. This activities have 2 fields that are foreing keys to user (created by and modified by). If

[web2py] Re: LOAD with ajax=False fails to pass vars

2011-06-10 Thread apple
Basically same as previous poster: View: {{extend 'layout.html'}} {{=LOAD(f='test.html', args=[1,2,3], vars=dict(x=1,y=2), ajax=False, ajax_trap=True)}} Controller: def test(): print(test) print request.args print request.vars print(end test) return I call it with

[web2py] Anyone interested in an AJAX version of CRUD?

2011-06-10 Thread cjrh
Yes. I am willing to help with code cleanup and documentation if you like. Just shout if you want help. I'll add any necessary documentation to the book too if it goes into trunk.

[web2py] Re: LOAD with ajax=False fails to pass vars

2011-06-10 Thread Massimo Di Pierro
This helps. I think I understand now and should be able to fix it tonight. On Jun 10, 1:54 pm, apple simo...@gmail.com wrote: Basically same as previous poster: View: {{extend 'layout.html'}} {{=LOAD(f='test.html', args=[1,2,3], vars=dict(x=1,y=2), ajax=False, ajax_trap=True)}}

[web2py] preview image from video file

2011-06-10 Thread Sahil Arora
I am making an application in which i want to show the preview image from an uploaded video and also stream that video. Can u please guide me how can I get a preview image from a video file. Also how to stream a video file

[web2py] Re: Anyone interested in an AJAX version of CRUD?

2011-06-10 Thread Ross Peoples
That would be something if it actually went into the trunk :) Thanks for offering to help to. I'll send you over what I have. It is a somewhat large and complicated plugin, so maybe you will find a better way to do some of the things in there and simplify it a bit.

[web2py] Re: Anyone interested in an AJAX version of CRUD?

2011-06-10 Thread cjrh
There is actually a high probability of it getting into trunk if we can get it suitably generic. I am much more familiar with Python than js, but since you're using AJAX that should be fine. Based on your description, it sounds great. Instead of sending me your files set up a project on

[web2py] Re: preview image from video file

2011-06-10 Thread Massimo Di Pierro
http://linuxers.org/tutorial/how-extract-images-video-using-ffmpeg On Jun 10, 2:00 pm, Sahil Arora sahilarora...@gmail.com wrote: I am making an application in which i want to show the preview image from an uploaded video and also stream that video. Can u please guide me how can I get a

[web2py] Re: Anyone interested in an AJAX version of CRUD?

2011-06-10 Thread Ross Peoples
I sent everything to you before I got this message, so now I'm looking at either using BitBucket or Google Code (because that's what web2py uses). That is unless Massimo wants to give me a named branch or something ;)

[web2py] Re: Anyone interested in an AJAX version of CRUD?

2011-06-10 Thread Ross Peoples
Ok, I made a repository on BitBucket, so anyone that wants to help with with this, please do. https://bitbucket.org/PhreeStyle/web2py_crud/src

[web2py] Import from another application in 1.96.x

2011-06-10 Thread Jim Karsten
In a controller of one application I import classes from a module in another application using either of these syntaxes. from applications.another_app.modules.mymodule import MyClass MyClass = local_import('mymodule', app='another_app').MyClass Is there a better way to do that with the

[web2py] Re: Anyone interested in an AJAX version of CRUD?

2011-06-10 Thread cjrh
Ok, I pulled. Will have a look over the next few days. Will probably send you diffs, which you can choose to accept/reject.

[web2py] Re: Anyone interested in an AJAX version of CRUD?

2011-06-10 Thread pbreit
Looks cool. I don't use crud (unless admin or appadmin uses it) but would check it out. Both Jquery and Jquery UI are in the Google CDN which is probably a better place to get them anyhow: http://code.google.com/apis/libraries/devguide.html#jquery If you include them like this they work both

[web2py] Re: Anyone interested in an AJAX version of CRUD?

2011-06-10 Thread Ross Peoples
I chose to go with a locally installed jQuery UI since my original project was designed to replace an internal enterprise application which may not have internet access once it goes into production. I suppose I could make it pull from the CDN by default to lower the barrier to entry. But I want

[web2py] Re: Anyone interested in an AJAX version of CRUD?

2011-06-10 Thread pbreit
Here's a trick from HTML5 Boilerplate for Jquery. I presume it could be modified for UI (or any library). script src=//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js/script scriptwindow.jQuery || document.write(script src='{{=URL('static','js/jquery.js')}}'\x3C/script)/script

Re: [web2py] Re: New Features in Book

2011-06-10 Thread Pierre Thibault
I can talk about the features that I implemented. Just ask. We could be documentation driven: The developer writes the feature he is going to implement, we write the tests (tests driven) and then he writes the implementation. This process will creates the documentation we need for the book. --

[web2py] how to use this ajax upload script with web2py?

2011-06-10 Thread danto
http://valums.com/ajax-upload/ It's supposed to be a ready-to-use asyncronous upload (could be a widget, later) with load indicator, but I don't know how to integrate with my form. In fact, I get no errors on console (as the author say after set debug: true) but still my upload fails. I can

Re: [web2py] Re: preview image from video file

2011-06-10 Thread Sahil Arora
Thanks for the help. I got the image from the video. Can u help me with the video streaming part. I could not get a good tutorial for this. On Sat, Jun 11, 2011 at 12:59 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: http://linuxers.org/tutorial/how-extract-images-video-using-ffmpeg

[web2py] Decorated Profiler - New Profiling library for python (thread, greenthread and WSGI friendly)

2011-06-10 Thread Dragonfyre13
I'm currently using this on a few of my projects, and decided to throw it up on bitbucket for others who might want to use it (and tell me areas I need to work on). It's pretty solid, again I'm using it already where I work, and it's got a pretty decent web based reporting and control interface.

[web2py] Script TDD in web2py

2011-06-10 Thread contatogilson...@gmail.com
Hello guys, I started to create a script to test the scripts that use the library unittest projects web2py. I usually like this: - I create the folder *tests* in the project; - Inside the tests folder create two folders: *models* and *controllers*; For now, I have done is to test the model

[web2py] web2py book changelog?

2011-06-10 Thread niknok
Is there like a change log for the web2py book where I can view what's been added or modified recently? /r

[web2py] implement public, password protected and private view for user

2011-06-10 Thread 黄祥
hi, i want to learn and implement public, password protected and private view for user, is there anyone know how to do that? thank you so much before e.g. === model === db.define_table('files', Field('title', label = T('Title') ),

[web2py] ajax is not working in components

2011-06-10 Thread 黄祥
hi, is ajax can work in components? i mean let say that i separated the comment into 2 components, 1 for list of view comments and the other is form to post the comment. i have a problem when i post the comment using the form, the data that have been posted is not directly change on list of

[web2py] Re: ajax is not working in components

2011-06-10 Thread Anthony
Maybe try having the post comment action return some JS via response.js that calls the web2py_component JS function to update the list component: def post_comment(): # do some stuff response.js='web2py_component(action=%s,target=%s)' % (URL('list_comments.load'), 'comment_list')

[web2py] Howto prepopulate a sqlform's drop-down field

2011-06-10 Thread tomt
Hi, I've written a controller to add a record using sqlform, and I want to prepopulate several of the fields. I've had some success using form.var.field = x, but I haven't been able to prepopulate the one field that uses a dropdown list. In the controller I listed below, I have success on the

[web2py] Re: preview image from video file

2011-06-10 Thread Massimo Di Pierro
are these video in static or uploaded by users? On Jun 10, 5:00 pm, Sahil Arora sahilarora...@gmail.com wrote: Thanks for the help. I got the image from the video. Can u help me with the video streaming part. I could not get a good tutorial for this. On Sat, Jun 11, 2011 at 12:59 AM, Massimo

Re: Re: Re: [web2py] Re: web2py 1.96.4 is OUT

2011-06-10 Thread Pierre Thibault
2011/6/9 Pierre Thibault pierre.thibau...@gmail.com 2011/6/9 caleb.hatti...@gmail.com On , Anthony abasta...@gmail.com wrote: Do you have an app to reproduce the problem? I created an app named Castalia (note the capitalization) with a module /modules/selfgroup/castalia/config.py, which I

Re: [web2py] Re: ajax is not working in components

2011-06-10 Thread Stifan Kristi
thank you so much for your hints, anthony, but, pardon me, the results on the form components is loading..., the page didn't show an error, but keep loading..., is there something i missed in my code? e.g. *=== controller ===* blog = db.blog blog_comment = db.blog_comment blog_comment_blog_id =

Re: [web2py] Re: preview image from video file

2011-06-10 Thread Stifan Kristi
how to integrate web2py with ffmpeg? i mean when users uploaded the video, web2py can automatic reproduce the image and store it in the database. is there any way to do this? thank you so much.

[web2py] Re: Howto prepopulate a sqlform's drop-down field

2011-06-10 Thread tomt
Hello again, I withdraw my question as I managed to get the obvious working: form.vars.cpaid = 6 # or whatever id is required I failed to get this working earlier, so I mistakenly assumed that the solution was more complex. I must have made some dumb mistake that disabled proper operation.

[web2py] Re: Social network plug-in

2011-06-10 Thread Luis Goncalves
Ciao Massimo! Is it now available somewhere for download? It will be very useful!!! Thanks, Luis.

Re: [web2py] Re: ajax is not working in components

2011-06-10 Thread Anthony
Do you have a blog_comment_show() action in your controller? On Friday, June 10, 2011 10:58:56 PM UTC-4, 黄祥 wrote: thank you so much for your hints, anthony, but, pardon me, the results on the form components is loading..., the page didn't show an error, but keep loading..., is there

Re: [web2py] Re: ajax is not working in components

2011-06-10 Thread Stifan Kristi
yes, i have. def blog_comment_show(): return __show_2(blog, blog_index, blog_comment, blog_comment_blog_id, blog_comment_active) @auth.requires_login() def __show_2(table_0, index_link, table_1, field, active): page = table_0(request.args(0)) or redirect(URL(index_link)) results =

Re: [web2py] Re: ajax is not working in components

2011-06-10 Thread Anthony
I think you're specifying the target div name in the wrong place. Instead of: {{=LOAD('default', 'blog_comment_show.load', args = page.id, ajax = True)}} {{=LOAD('default', 'blog_comment_add.load', args = page.id, target = 'comments_%s hidden' % page.id, ajax = True)}} I think you want: