[web2py] GAE Channel API and web2py mapping

2012-08-22 Thread Sushant Taneja
Hi, As per the GAE channel API documentation, for tracking client connections, I need to monitor the URLs /_ah/channel/connected and /_ah/channel/disconnected. How do I map these to web2py URLs ? I am guessing some changes will be needed in routes.py. I am currently using web2py 1.99.7 (latest

Re: [web2py] Re: Vanity URLs

2012-07-11 Thread Sushant Taneja
Yes, I have the controller with the name view.py and the function user On Wednesday, July 11, 2012 10:14:17 PM UTC+5:30, pbreit wrote: > > I guess this is the key line: > ('/$anything','404->/devekayan/view/user/$anything') > > That would require a controller file called "view.py" and a function "

Re: [web2py] Re: Vanity URLs

2012-07-11 Thread Sushant Taneja
e sing web2py trunk? Earlier version do not support the > 404-> > > On Wednesday, 11 July 2012 09:24:03 UTC-5, Sushant Taneja wrote: >> >> Yes, sure. I have attached my routes.py with this reply. >> >> On Wednesday, July 11, 2012 7:49:12 PM UTC+5:30, Massimo Di

Re: [web2py] Re: Vanity URLs

2012-07-11 Thread Sushant Taneja
Yes, sure. I have attached my routes.py with this reply. On Wednesday, July 11, 2012 7:49:12 PM UTC+5:30, Massimo Di Pierro wrote: > > Can I see your full routes? > > On Wednesday, 11 July 2012 02:26:04 UTC-5, Sushant Taneja wrote: >> >> I wrote the below line in route

Re: [web2py] Re: Vanity URLs

2012-07-11 Thread Sushant Taneja
I wrote the below line in routes.py. But I am getting a server response of 400 instead of 404. INFO 2012-07-11 07:21:03,242 dev_appserver.py:2952] "GET /staneja HTTP/1.1" 400 - So I tried after changing 404 to 400 but it is still the same. No redirection or request for the target URL is ma

[web2py] Vanity URLs

2012-07-07 Thread Sushant Taneja
Hi, I want to generate vanity urls for my users. For example: www.domain.com/user_first_name The above URL should actually point to the www.domain.com/appname/view/user/user_first_name How should I configure my routes.py so that I can achieve the above without disturbing other URLs ? Also I w

[web2py] Re: Using admin interface on GAE, getting errors on update or insert

2012-07-03 Thread Sushant Taneja
Whenever any query in run on GAE which involves usage of two or more properties, App engine forces you to define the index for those properties of the entity type. You need to modify the index.yaml file to achieve this. Take a look at this: https://developers.google.com/appengine/docs/python/con

[web2py] Re: Crappy downloaded image names

2012-06-18 Thread Sushant Taneja
(), change_ts = datetime.now() ) Thanks Anthony ! On Monday, June 18, 2012 8:28:25 PM UTC+5:30, Sushant Taneja wrote: > > Will this work on AppEngine ? Since there is no filesystem > > The code for manual uploads is : > > stream =

[web2py] Re: Crappy downloaded image names

2012-06-18 Thread Sushant Taneja
Will this work on AppEngine ? Since there is no filesystem The code for manual uploads is : stream = open(filename,'rb') Will this not give error since it will not be able to find the file ? On Monday, June 18, 2012 6:52:02 PM UTC+5:30, Anthony wrote: > > and the my show_image function is : >>

[web2py] Re: Crappy downloaded image names

2012-06-18 Thread Sushant Taneja
), Field('change_ts','datetime') ) and the my show_image function is : def show_image(): return response.download(request,dal_db) On Monday, June 18, 2012 5:58:27 PM UTC+5:30, Anthony wrote: > > What is your db.UserImageStore model, and what is the code for downlo

[web2py] Auto Login Redirect Failure

2012-06-14 Thread Sushant Taneja
_appserver.py:2891] "GET /devekayan/static/js/jquery.js?_=1339688611296 HTTP/1.1" 200 - INFO 2012-06-14 15:43:31,460 dev_appserver.py:2891] "GET /devekayan/static/js/web2py.js?_=1339688611425 HTTP/1.1" 200 - INFO 2012-06-14 15:43:31,508 dev_appserver.py:2891] "GET /devekayan/static/js/jquery.easing.js?_=1339688611466 HTTP/1.1" 200 - INFO 2012-06-14 15:43:31,547 dev_appserver.py:2891] "GET /devekayan/static/js/jquery.form.js?_=1339688611518 HTTP/1.1" 200 - But on the client side nothing happens. (i.e. the user remains on the registration page itself). The profile page is not loaded at all. The problem started occurring only after we integrated the blobstore service. Earlier we were storing images in datastore and everything was working fine. I have reproduced the problem in production and on both Chrome and Firefox browers. Can anyone tell me what might be the problem ? Thanks, Sushant Taneja

[web2py] Re: HTML in context_dict for sending mails

2012-06-05 Thread Sushant Taneja
L. > > Anthony > > On Monday, June 4, 2012 10:52:07 AM UTC-4, Sushant Taneja wrote: >> >> Hi All, >> >> I have a string var containing some HTML code >> >> links = "user_a" >> I am passing this variable to response.render function

[web2py] Re: web2py + GAE memory usage

2012-05-28 Thread Sushant Taneja
, Sushant Taneja wrote: > > Did you find the solution to the problem ? > I am facing the same issue. > > Thanks, > Sushant > > On Tuesday, February 21, 2012 2:02:08 AM UTC+5:30, howesc wrote: >> >> it does not seem to make a difference, so it is something else... > >

[web2py] Re: web2py + GAE memory usage

2012-05-28 Thread Sushant Taneja
Did you find the solution to the problem ? I am facing the same issue. Thanks, Sushant On Tuesday, February 21, 2012 2:02:08 AM UTC+5:30, howesc wrote: > > it does not seem to make a difference, so it is something else...

[web2py] Re: Integrating error pages in web2py on app engine

2012-05-11 Thread Sushant Taneja
day, May 11, 2012 11:06:18 PM UTC-4, Sushant Taneja wrote: >> >> Hi All, >> >> I have two static custom errors pages for all 4XX and 5XX error codes. >> I want to integrate them with my web2py application which needs to be >> deployed on app engine. >

[web2py] Integrating error pages in web2py on app engine

2012-05-11 Thread Sushant Taneja
ll me the correct way to achieve the above ? Thanks and Regards, Sushant Taneja

[web2py] Re: Multiple custom SQLFORMs on a page only able to submit one.

2012-04-02 Thread Sushant Taneja
Thanks. Got that reply sometime after I posted. I have changed my code. I have now created an upload image component with a form and am using the LOAD() feature with ajax=False to get it working. Thanks again for the reply. Helped a lot ! :) On Monday, April 2, 2012 7:20:24 PM UTC+5:30, Anthony

[web2py] Re: Multiple custom SQLFORMs on a page only able to submit one.

2012-04-02 Thread Sushant Taneja
Thanks Anthony. But as I stated above, the problem is the element which contains the _formname and _formkey is not getting generated on the page for the image upload form and I think that it might be creating the problem. What can be the reason for it ? On Monday, April 2, 2012 6:29:41 PM U

[web2py] Re: Multiple custom SQLFORMs on a page only able to submit one.

2012-04-02 Thread Sushant Taneja
:51 AM UTC+5:30, Sushant Taneja wrote: > > Hi, > > I tried with form.validate() and also with form.process().accepted. Can > you provide some sample code on how do I achieve the above ? > I am already providing the name of the form while declaring it. How is it > different

[web2py] Re: Multiple custom SQLFORMs on a page only able to submit one.

2012-04-01 Thread Sushant Taneja
Hi, I tried with form.validate() and also with form.process().accepted. Can you provide some sample code on how do I achieve the above ? I am already providing the name of the form while declaring it. How is it different from web2py generated _formname ? On Monday, April 2, 2012 5:07:14 AM UTC+

[web2py] Re: executing javascript after accepting a form

2012-03-27 Thread Sushant Taneja
Hi, If you are submitting your form via ajax then you can use eval to call a JS function. You can check out the syntax here : http://web2py.com/books/default/chapter/29/11#Eval-target create a JS function showDialog(){ // write code here } in the controller write the return statement as : r

[web2py] Re: Acces a page with @auth.requires_login() don't work

2012-03-25 Thread Sushant Taneja
Just a thought here, but have you tried logging out and logging in again with the same password. Does it work ? On Sunday, March 25, 2012 3:47:53 PM UTC+5:30, bussiere adrien wrote: > > i've created and logged my user with : > > password="toto" > my_crypt = CRYPT(key=auth.settings.hmac_​key) > cr

[web2py] Re: Using Blobstore API

2012-03-24 Thread Sushant Taneja
> think it might be. > > > On Wednesday, March 7, 2012 1:36:40 AM UTC-8, Sushant Taneja wrote: >> >> Hi, >> >> I am trying to use the Google Blobstore API for uploading images. I also >> checked the link: >> http://www.web2pyslices.​com/main/slices

[web2py] Re: Auto Login on Google App engine

2012-03-23 Thread Sushant Taneja
to the session > perhaps. > > On Friday, March 23, 2012 5:55:33 AM UTC-7, Sushant Taneja wrote: >> >> Hi, >> >> As per the source code of the auth.register(), if auto-login is enabled, >> another DAL query is executed to get the user from auth_user table

[web2py] Auto Login on Google App engine

2012-03-23 Thread Sushant Taneja
Hi, As per the source code of the auth.register(), if auto-login is enabled, another DAL query is executed to get the user from auth_user table. 1958 user = self.db(table_user[username] == form.vars[username]).select

Re: [web2py] Correct way to use memcache on GAE with web2py

2012-03-18 Thread Sushant Taneja
GAE but all environments i believe. > > On Friday, March 16, 2012 10:03:36 AM UTC-7, Sushant Taneja wrote: >> >> Hi, >> >> I am stuck here, I tried the mentioned code, there are 2 problems I am >> facing: >> >> 1. All the table columns are extracte

Re: [web2py] Correct way to use memcache on GAE with web2py

2012-03-16 Thread Sushant Taneja
ookup __builtin__.function failed* but once I use the as_list() function it works fine. Any thoughts ? On Friday, March 16, 2012 1:07:58 PM UTC+5:30, Sushant Taneja wrote: > > Thanks ! > > On Friday, March 16, 2012 2:04:42 AM UTC+5:30, Jonathan Lundell wrote: >> >> On Mar

Re: [web2py] Correct way to use memcache on GAE with web2py

2012-03-16 Thread Sushant Taneja
Thanks ! On Friday, March 16, 2012 2:04:42 AM UTC+5:30, Jonathan Lundell wrote: > > On Mar 15, 2012, at 1:15 PM, Sushant Taneja wrote: > > I have a tags table which will be available to all logged in users. The > table has the following structure: > > > >

[web2py] Correct way to use memcache on GAE with web2py

2012-03-15 Thread Sushant Taneja
Hi, I have a tags table which will be available to all logged in users. The table has the following structure: db.define_table('META_TAG', Field('tag','string',notnull=True), Field('root_tag','string',notnull=True), Field('active_ind','string',length=1,default='Y') ) This table will

Re: [web2py] LOAD() function breaking CSS animation

2012-03-13 Thread Sushant Taneja
;click" handler > attached. Instead, you should use the new jQuery.on() (which is recommended > instead of .live() or .delegate() -- see http://api.jquery.com/on/) to > attached the click event. > > Anthony > > On Tuesday, March 13, 2012 4:15:57 PM UTC-4, Sushant Ta

Re: [web2py] LOAD() function breaking CSS animation

2012-03-13 Thread Sushant Taneja
Does this mean that I have to reload the JS again with the form as it is reloaded after submit ? On Wednesday, March 14, 2012 1:45:57 AM UTC+5:30, Sushant Taneja wrote: > > Sorry, but I didn't get you. > > As per my understanding the component is loaded with option ajax=False

Re: [web2py] LOAD() function breaking CSS animation

2012-03-13 Thread Sushant Taneja
Sorry, but I didn't get you. As per my understanding the component is loaded with option ajax=False, thus it will load with rest of the page. The

Re: [web2py] LOAD() function breaking CSS animation

2012-03-13 Thread Sushant Taneja
he *flipLink and > **flipToLogin > objects? > > > * > On Tue, Mar 13, 2012 at 4:04 PM, Sushant Taneja < > sushant.tanej...@gmail.com> wrote: > >> Hi, >> >> In my view index.html, I have two forms: auth.login() and custom forgot >> passwor

[web2py] LOAD() function breaking CSS animation

2012-03-13 Thread Sushant Taneja
Hi, In my view index.html, I have two forms: auth.login() and custom forgot password form. Initially the login form is displayed with a Forgot Password link. When we click on the link the form flips(rotates using CSS) and the forgot password form is now displayed. The forgot password form is a

[web2py] Re: Auth.user is still NULL after a successful login

2012-03-13 Thread Sushant Taneja
can either extend Auth and override the login() method or build a custom login functionality. Let me know if there is an easier way On Tuesday, March 13, 2012 11:02:54 AM UTC+5:30, Sushant Taneja wrote: > > Hi, > > Ah, I forget that form.custom.begin is an XML object (more like a string)

[web2py] Re: Auth.user is still NULL after a successful login

2012-03-12 Thread Sushant Taneja
Hi, Ah, I forget that form.custom.begin is an XML object (more like a string) > and doesn't change when you directly manipulate the form object itself. You > could do: > > f.custom.begin = '%s id="login">' % f.custom.begin[:-1] > I added the above code line in controller. The attribute id was

[web2py] Re: Auth.user is still NULL after a successful login

2012-03-12 Thread Sushant Taneja
{{=login_form.custom.end}} On Tuesday, March 13, 2012 12:25:53 AM UTC+5:30, Anthony wrote: > > Hmm, works when I try it. Can you show the full controller code you have > now? > > On Monday, March 12, 20

[web2py] Re: Auth.user is still NULL after a successful login

2012-03-12 Thread Sushant Taneja
> > Anthony > > On Monday, March 12, 2012 2:07:20 PM UTC-4, Sushant Taneja wrote: >> >> Hi, >> >> I tried both but none seems to be working. Here's my view code: >> >> >> >&g

[web2py] Re: Auth.user is still NULL after a successful login

2012-03-12 Thread Sushant Taneja
11:32:04 PM UTC+5:30, Anthony wrote: > > That should work. Can you show the view code? Also, note you can just do: > > login_form['_id'] = 'login' > > Anthony > > On Monday, March 12, 2012 1:19:45 PM UTC-4, Sushant Taneja wrote: >> >> I tried c

[web2py] Re: Auth.user is still NULL after a successful login

2012-03-12 Thread Sushant Taneja
e generated form does not contain any id attribute. Is there another way to do it ? Thanks, Sushant On Monday, March 12, 2012 8:01:33 PM UTC+5:30, Sushant Taneja wrote: > > Thanks for an explanatory answer. > I will try this out. > > On Monday, March 12, 2012 7:49:28 PM

[web2py] Re: Auth.user is still NULL after a successful login

2012-03-12 Thread Sushant Taneja
Thanks for an explanatory answer. I will try this out. On Monday, March 12, 2012 7:49:28 PM UTC+5:30, Anthony wrote: > > def index(): >> >> login_form = auth.login() >> if login_form.process(session=None,formname='login').accepted: >> pass >> elif login_form.errors: >>

Re: [web2py] Auth.user is still NULL after a successful login

2012-03-12 Thread Sushant Taneja
> Em 12/03/2012 09:43, "Sushant Taneja" > escreveu: > >> Hi, >> >> Following is the snippet from my db.py global file: >> >> db = DAL('google:datastore') >> >> from gluon.tools import Auth >> auth

[web2py] Auth.user is still NULL after a successful login

2012-03-12 Thread Sushant Taneja
Hi, Following is the snippet from my db.py global file: db = DAL('google:datastore') from gluon.tools import Auth auth = Auth(db, hmac_key=Auth.get_or_create_key()) auth.settings.login_url = URL('default','index') auth.settings.logged_url = URL('user','profile') auth.settings.login_next = URL('

[web2py] Re: Key Error: auth_user on GAE

2012-03-09 Thread Sushant Taneja
Please ignore the above. Found the error. I had a conditional model file for the controller which was shadowing the global db variable. Removed it, now everything is working fine. On Friday, March 9, 2012 9:31:40 PM UTC+5:30, Sushant Taneja wrote: > > Hi, > > I have extended

[web2py] Key Error: auth_user on GAE

2012-03-09 Thread Sushant Taneja
Hi, I have extended the default auth_user table in my model file db.py as follows: db = DAL('google:datastore') from gluon.tools import Auth auth = Auth(db, hmac_key=Auth.get_or_create_key()) auth.settings.extra_fields['auth_user'] = [ Field('first_name','string',required=True, notnull=Tru

[web2py] Re: Obtaining URL to image blob in GAE

2012-03-07 Thread Sushant Taneja
As available in the google documentation, we need a UploadHandler ? How it is achieved in the above code ? On Thursday, March 8, 2012 1:38:04 AM UTC+5:30, Sushant Taneja wrote: > > Hi, > > Can you explain some of the code like how and in which variable the > blob_key is saved

[web2py] Re: Obtaining URL to image blob in GAE

2012-03-07 Thread Sushant Taneja
Hi, Can you explain some of the code like how and in which variable the blob_key is saved after the image successfully uploaded in the blobstore ? On Thursday, March 1, 2012 10:53:30 PM UTC+5:30, howesc wrote: > > my blobstore_image model: > > db.define_table('blobstore_image', >

Re: [web2py] Update query failing on GAE

2012-03-07 Thread Sushant Taneja
The update() returns 0. I am now taking care of it. But I still don't see any error logs corresponding to the updates etc. May be the reason is eventual consistency. Thanks for the help On Wednesday, March 7, 2012 10:16:32 AM UTC+5:30, Sushant Taneja wrote: > > As per my understand

[web2py] Using Blobstore API

2012-03-07 Thread Sushant Taneja
Hi, I am trying to use the Google Blobstore API for uploading images. I also checked the link: http://www.web2pyslices.com/main/slices/take_slice/63 for the help but couldn't understand much. In my application's (uploadPic) default controller I have the code as follows: from google.appengine.

Re: [web2py] Update query failing on GAE

2012-03-06 Thread Sushant Taneja
ing to see what is happening. > perhaps the row is not found? (remember eventual consistency), perhaps > there is some other error that is currently not being logged > > On Tuesday, March 6, 2012 7:18:36 AM UTC-8, Sushant Taneja wrote: >> >> Yes I did check GAE lo

Re: [web2py] Update query failing on GAE

2012-03-06 Thread Sushant Taneja
Yes I did check GAE logs. There are no logs with severity level error. On Tuesday, March 6, 2012 7:46:52 PM UTC+5:30, yamandu wrote: > > I dont know, but have you examined the GAE log? > > 2012/3/6 Sushant Taneja : > > Hi, > > > > I thought the same but as you can

Re: [web2py] Update query failing on GAE

2012-03-06 Thread Sushant Taneja
pdate too many records. GAE has > time limitations, I dont know how much because I dont use it anymore. > Search for the GAE docs on these limitations. > > 2012/3/6 Sushant Taneja : > > Hi All, > > > > I am building a invite module. > > In the contro

[web2py] Update query failing on GAE

2012-03-06 Thread Sushant Taneja
Hi All, I am building a invite module. In the controller, I have the following code : try: some initial stuff try: ... some stuff update_request_query = (db.INVITE_SIGNUP.email_id == request_email_id) db(update_request_query).update(activation_key=key,activ

[web2py] Re: Difference between storing session in memcache v/s DB

2012-03-06 Thread Sushant Taneja
Thanks. On Monday, March 5, 2012 12:24:04 AM UTC+5:30, Massimo Di Pierro wrote: > > Sessions with web2py on GAE must go in DB, else they are not reliable (you > may find yourself logged out because cache is cleared). > > On Saturday, 3 March 2012 23:12:34 UTC-6, Sushant Taneja

[web2py] Difference between storing session in memcache v/s DB

2012-03-03 Thread Sushant Taneja
Hi, I am creating an application for deployment on GAE. I would like to know the advantages and disadvantages of storing sessions in memcache v/s google datastore. Thanks, Sushant