[web2py] Re: duplicate ids on using auth.login and auth.register forms on same page

2010-05-17 Thread Tarun
th.register()}} By registering, you confirm that you accept our Terms of service. I can only see class for auth_user_password_two__row, for all other fields ids are used. Thanks Tarun On May 13, 6:36 pm, mdipierro wrote: > please post an example of the controller and view. If

[web2py] Re: can web2py support RESTful api calls? if so any pointers on how to build one?I

2011-01-31 Thread Tarun
At Radbox, we allow user to add a video by calling our api http://api.radbox.me/video/add?url=url&dev=devKey&user=userKey&t=title Basically, it's a normal url with video as controller and add as function with returned format as json which is provided by web2py. We have not built api to authenticat

[web2py] Re: Customizing auth in some interesting ways:

2011-04-25 Thread Tarun
We have similar login/register forms at Radbox (http://radbox.me ). Both register and login forms are default provided by web2py enclosed by div and styled using css on enclosing div. e.g. {{=auth.login()}} {{=A('Forgot password?', _href=URL(request.applicat

[web2py] form=auth() does not honor setting.login_url incase no arg is passed

2011-09-19 Thread Tarun Arora
web2py version 1.98.2 If a custom url is set for login_url (via auth.settings.login_url) and no arg is passed, auth() does not honor login_url and redirects to url based on controller set while initializing Auth() e.g. auth=Auth(globals(),db) auth.settings.login_url = URL(request.application,

[web2py] reset_password_onvalidation fired while requesting retrieve_password form

2011-09-21 Thread Tarun Arora
web2py version 1.98.2 I have a custom form on reset_password, where i want to have my own validations on top of default validations, but reset_password_onvalidation was not called on resetting password. Digging into code, I observed that while fetching retrieve_password form onvalidation is se

[web2py] limitby without orderby - why primary ids of tables are added as orderby

2011-09-22 Thread Tarun Arora
I have a requirement, just to have 50 random records from table without any order. I don't want to use any orderby condition as number of records in tables is very large and any ordering is over-head cost when I need random records. A query like *db().select(db.person.name, limitby=(0,50)) *aut

Re: [web2py] limitby without orderby - why primary ids of tables are added as orderby

2011-09-22 Thread Tarun Arora
any orderby is over-head (small or big). Also limit with order by is not cost-efficient since limiting is done after ordering rows, resulting in fetching of all rows. For time being, I am using executesql to execute my query.

Re: [web2py] limitby without orderby - why primary ids of tables are added as orderby

2011-09-22 Thread Tarun Arora
http://www.depesz.com/index.php/2007/09/16/my-thoughts-on-getting-random-row/ explains alternate approaches than using order by random(). "this is very good way to get truly random records. there is no “preference” for specific rows. the major drawback is speed. or lack of it actually."

[web2py] postgres - prepared statements in DAL?

2011-08-03 Thread Tarun Arora
Is it possible to create and execute prepared statements in DAL for postgresql? I observed there is a prepare api for creating 'PREPARE TRANSACTIONS' for two-phase commit but no api for prepared statements.

[web2py] Re: Help needed with Google App Engine on Ubuntu 11.04

2011-08-03 Thread Tarun Arora
I was facing same issues. I found a ppa for python 2.5. It is maintained by Felix Krull sudo add-apt-repository ppa:fkrull/deadsnakes sudo apt-get update sudo apt-get install python2.5 After this urllib2.HTTPSHandler errors were gone and was

[web2py] Re: postgres - prepared statements in DAL?

2011-08-03 Thread Tarun Arora
We have lots of queries where we only need to change variables( bind parameters) and I was thinking of using prepared statements as it is recommended way for optimize performance to avoid over ahead costs of planning, parsing by query analyzer each time query is executed. 2-phase commit it not

[web2py] help with request

2014-01-10 Thread Tarun Kumar
Hi! people I am new to web2py and web development. I am a bit confused about the request object. In its variables which can be accessed by request.vars.variable_name are the values stored only for the most recent request or for all the past requests. Considering the example given in web2py book