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 in
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://stackoverflow.com/**q/10117143/937891http
of supported.
Anthony
On Thursday, April 12, 2012 2:48:51 AM UTC-4, Sathvik Ponangi wrote:
From
http://stackoverflow.com/**q/10117143/937891http://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
Is there a PHP like reference manual for Web2Py?
Or maybe an IDE that'll help a newbie, ex-PHPite like me build faster?
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:25:52 AM UTC-5, Sathvik Ponangi wrote:
Is there a PHP like reference manual for Web2Py?
Or maybe an IDE that'll help a newbie, ex
Is there some way to run Web2Py on PyPy http://pypy.org?
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...
and you'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
Yup http://www.web2py.com/book/default/chapter/04#request.
Thank you David!
On Sun, Feb 5, 2012 at 9:13 PM, David da...@styleflare.com 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
resilient to app-name changes
How do I get the name of the current Web2Py app, so that my code is
resilient to app-name changes?
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
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!
?
With Regards,
Sathvik
--
Sathvik Ponangi
, 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 psath...@gmail.com wrote
Is there someway that I could call a function when the user ends their
session?
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 rochacbr...@gmail.com wrote:
On Mon, Nov 7, 2011 at 2:55 AM, Sathvik Ponangi psath...@gmail.comwrote
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
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 abasta...@gmail.com wrote:
On Sunday, November 6, 2011 11:51:23 PM UTC-5, Sathvik Ponangi wrote
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
I mean http://my_site/user_name/page_name
http://my_site/user_name/page_name/link1/...
I finally got it to work! Its nice that request.args holds all additional
parameters. Thank you for your time, Massimo!
--
Sathvik Ponangi
I'm using Web2py 1.99.2(Stable) on Google AppEngine (SDK v1.5.5) for Python
2.5
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
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
The code works fine when the class is a part of the controller itself, but
not as a module...
:
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 the ticket-issued
screen?
I've tried using the default routes.py, by setting
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 psath...@gmail.com wrote:
@Massimo: I've tried it with routes_onerror = [('*/*',
'/init/static/error.**html')] in routes.py it still shows me a ticket.
@Anthony
:
Are you sure this is exactely your code?
commons.FileSystem().get_file(Testing).split(,)
On Nov 6, 11:57 am, Sathvik Ponangi psath...@gmail.com wrote:
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
...@umich.edu wrote:
i've never seen that.
got a code example? which version of the SDK?
--
Sathvik Ponangi
?
Thank you in advance.
With Regards,
Sathvik
--
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:
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
I don't have one. How do I generate it?
On Wed, Oct 19, 2011 at 7:39 PM, Anthony abasta...@gmail.com 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' fixed it!!! It works
now.
Thank you all a lot
Dear Anthony,
I am testing it locally, just as the book says. Do I need to do something
else?
With Regards,
Sathvik
@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_recordhttp://www.web2py.com/book/default/chapter/06#update_record,
I get a Syntax error saying
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...
db(db.files.hash==name).select().first() always gives None, what's the right
way to do it?
Thanks for your help...
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
38 matches
Mail list logo