[web2py] Query or Expression for excluding certain values from DAL selection on GAE

2012-04-11 Thread Sathvik Ponangi
>From http://stackoverflow.com/q/10117143/937891 I'm trying to exclude posts which have a tag named meta from my selection, by: meta_id = db(db.tags.name == "meta").select().first().id not_meta = ~db.posts.tags.contains(meta_id) posts=db(db.posts).select(not_meta) But those posts still show up

Re: [web2py] Re: Query or Expression for excluding certain values from DAL selection on GAE

2012-04-12 Thread Sathvik Ponangi
GAE DataStore - Web2Py 1.99.7 Stable On Thu, Apr 12, 2012 at 5:53 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > What database, what web2py version? > > > On Thursday, 12 April 2012 01:48:51 UTC-5, Sathvik Ponangi wrote: >> >> From >> http://s

Re: [web2py] Re: Query or Expression for excluding certain values from DAL selection on GAE

2012-04-12 Thread Sathvik Ponangi
> "suported" instead of "supported". > > Anthony > > > On Thursday, April 12, 2012 2:48:51 AM UTC-4, Sathvik Ponangi wrote: >> >> From >> http://stackoverflow.com/**q/10117143/937891<http://stackoverflow.com/q/10117143/937891> >> &

[web2py] Getting the name of the Application

2012-02-05 Thread Sathvik Ponangi
How do I get the name of the current Web2Py app, so that my code is resilient to app-name changes?

Re: [web2py] Getting the name of the Application

2012-02-06 Thread Sathvik Ponangi
Yup <http://www.web2py.com/book/default/chapter/04#request>. Thank you David! On Sun, Feb 5, 2012 at 9:13 PM, David wrote: > On 2/5/12 10:06 AM, Sathvik Ponangi wrote: > >> How do I get the name of the current Web2Py app, so that my code is >> resil

[web2py] Support for PyPy

2012-02-10 Thread Sathvik Ponangi
Is there some way to run Web2Py on PyPy ?

[web2py] Re: Modules: how to access db

2012-02-10 Thread Sathvik Ponangi
Instead of using gluon, I pass it while importing the module. For example, if my module is commons, then in my controller: import commons commons.db = db commons.request = request commons.session = session Now db , request and session should now be available in the module...

Re: [web2py] Re: Modules: how to access db

2012-02-10 Thread Sathvik Ponangi
27;ll get request from one session, and session from another, and > db from a third. > > "current" is a thread-local thing, guaranteed not to be touched by any > other part - use "current", not "common" (or whatever your own module is > called) > -- Sathvik Ponangi

[web2py] Reference Manual for Web2Py

2012-02-23 Thread Sathvik Ponangi
Is there a PHP like reference manual for Web2Py? Or maybe an IDE that'll help a newbie, ex-PHPite like me build faster?

Re: [web2py] Re: Reference Manual for Web2Py

2012-02-23 Thread Sathvik Ponangi
oogle.com/p/rad2py/), which is > designed to work with web2py. > > Note, aside from the list of HTML helpers and form validators, the API is > actually fairly compact (http://web2py.com/books/default/chapter/29/4#API > ). > > Anthony > > On Thursday, February 23, 2012 11:2

[web2py] Unable to write to AppEngine DataStore using web2py's DAL

2011-10-16 Thread Sathvik Ponangi
http://stackoverflow.com/questions/7767808/unable-to-write-to-appengine-datastore-using-web2pys-dal/7768108#7768108 I've just started using web2py with Google AppEngine for an app of mine. For some reason, I'm unable to save/retrieve data using the DAL. Here's the code I'm using: At the end of

[web2py] DAL: Selecting using the 'WHERE' clause

2011-10-18 Thread Sathvik Ponangi
db(db.files.hash==name).select().first() always gives None, what's the right way to do it? Thanks for your help...

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-18 Thread Sathvik Ponangi
of one of the > records? > > > On Tuesday, October 18, 2011 12:16:09 PM UTC-4, Sathvik Ponangi wrote: > >> Dear Johann, >> I'm using Web2py with Google AppEngine & I can see that the rows have the >> required value on the DataStore Viewer (on the SDK console)

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-19 Thread Sathvik Ponangi
he field type from 'text' to 'string'. on > GAE 'text' fields do not support all the filtering operations i think. if > that change makes it work (you probably will have to re-insert the data), > then we should re-read the docs about text fields on GAE > -- Sathvik Ponangi

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-19 Thread Sathvik Ponangi
I don't have one. How do I generate it? On Wed, Oct 19, 2011 at 7:39 PM, Anthony wrote: > On Wednesday, October 19, 2011 8:56:59 AM UTC-4, Sathvik Ponangi wrote: >> >> Dear Howsec, >> >> Bulls-Eye! Changing it from 'text' to 'string'

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-19 Thread Sathvik Ponangi
Dear Anthony, I am testing it locally, just as the book says. Do I need to do something else? With Regards, Sathvik

[web2py] Re: DAL: Selecting using the 'WHERE' clause

2011-10-19 Thread Sathvik Ponangi
@Anthony, I am running it with the Google AppEngine SDK for Python 1.5.5 on Windows7 I've just run into another issue here, with updating the records... When I try to update the table with update_record, I get a Syntax error saying t

[web2py] Re: DAL: Selecting using the 'WHERE' clause

2011-10-19 Thread Sathvik Ponangi
Please ignore my previous post, the error was caused by another section of my code which went bad when I replaced 'text' with 'string' in my db.py file, accidentally altering the names of a few fields. Thank you all for everything...

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-20 Thread Sathvik Ponangi
datastore/typesandpropertyclasses.html#StringProperty>, > a TextProperty value can be more than 500 characters long. However, > TextProperty values are not indexed, and cannot be used in filters or sort > orders." -- Sathvik Ponangi

[web2py] Re: DAL: Selecting using the 'WHERE' clause

2011-10-20 Thread Sathvik Ponangi
Am I getting this error because of a timeout on the Appengine SDK? INFO 2011-10-21 03:43:14,782 dal.py:3399] 1 INFO 2011-10-21 03:43:14,786 gaehandler.py:72] Request: > 64720.00ms/64719.96ms (real time/cpu time) INFO 2011-10-21 03:43:14,913 recording.py:371] Saved; key: > __ap

Re: [web2py] Re: DAL: Selecting using the 'WHERE' clause

2011-10-21 Thread Sathvik Ponangi
howesc wrote: > i've never seen that. > > got a code example? which version of the SDK? > -- Sathvik Ponangi

[web2py] Alternative to Transactions

2011-10-21 Thread Sathvik Ponangi
update the database? Thank you in advance. With Regards, Sathvik -- Sathvik Ponangi

[web2py] Re: Displaying custom error message instead of the ticketing system

2011-11-06 Thread Sathvik Ponangi
I'm using Web2py 1.99.2(Stable) on Google AppEngine (SDK v1.5.5) for Python 2.5

[web2py] Displaying custom error message instead of the ticketing system

2011-11-06 Thread Sathvik Ponangi
Hello all, How do I display a custom error message instead of the ticket-issued screen? > I've tried using the default routes.py, by setting : routes_onerror = > [(r'*/*',r'/init/static/error.html')] Thanks in advance. With Regards, Sathvik

[web2py] Problem with using a method from a module

2011-11-06 Thread Sathvik Ponangi
Hi, I'm using Web2py (1.99.2_Stable) on GAE (1.5.5). I have the following class in a module named commons.py: > class FileSystem(): > > def get_file(self, bash): > return db(db.files.bash==bash).select().first() > > I'm trying to invoke this method from my controller as: > import

[web2py] Re: Problem with using a method from a module

2011-11-06 Thread Sathvik Ponangi
The code works fine when the class is a part of the controller itself, but not as a module...

Re: [web2py] Re: Displaying custom error message instead of the ticketing system

2011-11-06 Thread Sathvik Ponangi
wrote: > Is there an actual '/init/static/error.html' file in your GAE installation > of web2py? > > > On Sunday, November 6, 2011 10:18:29 AM UTC-5, Sathvik Ponangi wrote: >> >> Hello all, >> >> How do I display a custom error message instead of

Re: [web2py] Re: Displaying custom error message instead of the ticketing system

2011-11-06 Thread Sathvik Ponangi
Restarting my AppEngine server has fixed this issue. Thank you all for your help. On Mon, Nov 7, 2011 at 10:05 AM, Sathvik Ponangi wrote: > @Massimo: I've tried it with routes_onerror = [('*/*', > '/init/static/error.**html')] in routes.py & it still shows me

Re: [web2py] Re: Problem with using a method from a module

2011-11-06 Thread Sathvik Ponangi
gmail.com> wrote: > Are you sure this is exactely your code? > > commons.FileSystem().get_file("Testing").split(",") > > On Nov 6, 11:57 am, Sathvik Ponangi wrote: > > Hi, > > > > I'm using Web2py (1.99.2_Stable) on GAE (1.5.5). >

Re: [web2py] Re: Problem with using a method from a module

2011-11-07 Thread Sathvik Ponangi
Thank you Bruno! I added commons.db = db to my controller to make db globally available in that module. Thanks again! With Regards, Sathvik On Mon, Nov 7, 2011 at 10:54 AM, Bruno Rocha wrote: > > > On Mon, Nov 7, 2011 at 2:55 AM, Sathvik Ponangi wrote: > >> Dear Mass

[web2py] Custom URLs for user profiles

2011-11-07 Thread Sathvik Ponangi
Is there someway that could display each of my user's profile as a custom URL like http://my_site.com/user_name ? I'm using Web2Py(1.99.2_Stable) on GAE (SDKv1.5.5) on Python2.5 -- Sathvik Ponangi

Re: [web2py] Re: Displaying custom error message instead of the ticketing system

2011-11-07 Thread Sathvik Ponangi
Thanks! On Mon, Nov 7, 2011 at 8:21 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > You can also try call: > > http://.../admin/default/reload_routes > > On Nov 7, 6:47 am, Anthony wrote: > > On Sunday, November 6, 2011 11:51:23 PM UTC-5, Sathvik Ponangi

[web2py] Re: Custom URLs for user profiles

2011-11-07 Thread Sathvik Ponangi
Thank you Massimo. I'm using a DAL table for users db.define_table('users', > db.Field('name', 'string'), > db.Field('password', 'password') > ) How should I go about it? Also I'd like the same for non user-pages like http://my_site.com/my_page

[web2py] Re: Custom URLs for user profiles

2011-11-07 Thread Sathvik Ponangi
I mean http://my_site/user_name/page_name & http://my_site/user_name/page_name/link1/...

Re: [web2py] Re: Custom URLs for user profiles

2011-11-07 Thread Sathvik Ponangi
I finally got it to work! Its nice that request.args holds all additional parameters. Thank you for your time, Massimo! -- Sathvik Ponangi

[web2py] Detecting if a session has ended

2011-11-09 Thread Sathvik Ponangi
Is there someway that I could call a function when the user ends their session?

Re: [web2py] Re: Detecting if a session has ended

2011-11-10 Thread Sathvik Ponangi
gt; > Is there a auth.settings.login_onlogin ?? >> > >> > Thanks >> > >> > Richard >> > >> > On Wed, Nov 9, 2011 at 2:14 PM, Massimo Di Pierro < >> > >> > >> > >> > >> > >> > >> > >> > massimo.dipie...@gmail.com> wrote: >> > > Sessions never end. Do you want to detect logout? >> > >> > > auth.settings.logout_onlogout = lambda user: do_something_with(user) >> > >> > > On Nov 9, 11:58 am, Sathvik Ponangi wrote: >> > > > Is there someway that I could call a function when the user ends >> their >> > > > session? >> > > -- Sathvik Ponangi

[web2py] ImportError with AppEngine SDK v1.6.0

2011-11-11 Thread Sathvik Ponangi
it worked fine before the update. Can someone help me out? With Regards, Sathvik -- Sathvik Ponangi

[web2py] Re: Mongo DB, AMFRPC3 and http 500 errors

2011-11-12 Thread Sathvik Ponangi
I keep getting a RestrictedError for certain kinds of output, especially when I try using modules in my views & they are usually hard to trace. I think web2py restricts the kind of things you can output, probably for security reasons... Hope that helped!

[web2py] Prevent auto-conversion of %20

2011-11-14 Thread Sathvik Ponangi
Hi, I'm using Web2Py(stable) with GAE(py2.5, SDK1.5.5). The '%20' parts of the url in request.args automatically change into underscores '_' . How do I get them to stay that way, so that I may use them as spaces (with urllib.decode)? With Regards, Sathvik -- Sathvik Ponangi