The docs look amazing, and web2py should get many more users as a
result, nice work.
Robin
On Aug 6, 10:17 am, mdipierro wrote:
> yes, thanks to Jonathan, Thadeus, Michele, Bruno, Sriram and all those
> who are helping with revisions.
>
> Massimo
>
> On Aug 6, 10:12 am, Adi wrote:
>
>
>
> > Gre
You might want to also take a look at Google's new Storage for
Developers:
http://code.google.com/apis/storage/
It is pretty much Google's clone of Amazon S3 storage, but with a nice
web interface.
Robin
On May 15, 10:47 am, Oatman wrote:
> Sorry to hijack the thread somewhat, but where can I
Recently (05/19/10) the task queues execute during development:
"Auto task execution is now enabled in the dev_appserver. To turn this
off use the flag --disable_task_running."
http://code.google.com/p/googleappengine/wiki/SdkReleaseNotes
Robin
On May 11, 7:45 pm, Richard wrote:
> > Does this
The 1000 result limit was removed in Feb when they added query cursors
[1]. You can use the task queue to perform fault tolerant map reduce
jobs [2]. Full text search should be announced this month at
GoogleIO.
[1]
http://googleappengine.blogspot.com/2010/02/app-engine-sdk-131-including-major.h
Yes GAE supports read-only access to 'application' files in
production, that is how the view loader works.
GAE handles static and application files separately. When your app is
uploaded, the static files are pushed to a static file server and your
application files are pushed to an application se
As a warning, querying before inserting does not guarantee uniqueness
in the transactional sense.
If 2 users try to add the same name at the same time, they will both
insert and you will not have uniqueness.
The only way to get transactional uniqueness on GAE is using a keyname
and a transactiona
You don't need a route, you need a redirect.
Check the path and scheme each request, and redirect to what you want.
Robin
On Jan 11, 2:44 am, JimK wrote:
> Is it possible to setup a route that redirects all attempts to access
> the login and register pages to https? In other words, userA goes
Since you already have the remote API and console working, it is easy
to delete a table by name:
Lets assume your web2py model was called 'person':
>>> from google.appengine.ext import db
>>> class person(db.Expando): pass
>>> for p in person.all():
... p.delete()
>>> person.all().count(
t least there
> should not be. Yet I do not know how GAE is implemented and I have not
> benchmarked it.
>
> Massimo
>
> On Dec 13, 11:17 pm, Robin B wrote:
>
> > IN is not magic, and evaluates1 db query for each member, and should
> > be used carefully.
>
IN is not magic, and evaluates1 db query for each member, and should
be used carefully.
q3=(db.table.field.belongs(('value1','value2','value3')))
evaluates 3 db queries to get the result,
Robin
On Dec 13, 5:33 am, Richard wrote:
> neat! I need to keep closer track of GAE developments ...
>
> O
Massimo,
This sounds like the Python ski trip that you have been looking for:
http://www.coactivate.org/projects/snow-sprint-2010/project-home
Robin
On Nov 14, 6:44 pm, weheh wrote:
> If you've never skiied in the US, then I recommend Utah. The snow is
> the best. And access from the airport
Okay I updated the recipe to use memcache and cron to synchronize
tasks and ensure exactly 1 task is ever active
http://appengine-cookbook.appspot.com/recipe/hot-handler
Robin
On Nov 12, 4:26 pm, Robin B wrote:
> > Robin, do you have any idea how we can make sure, that a new keep-
>
> Robin, do you have any idea how we can make sure, that a new keep-
> alive task only gets insertet, if the queue is empty? Unfortunately
> there seems to be no method to query a task queue.
I do not think you can read the queue length.
Tasks will not be removed unless they receive a 200 http
You should also see this:
http://www.extjs.com/deploy/dev/examples/desktop/desktop.html
Robin
On Nov 8, 1:02 am, mdipierro wrote:
> Really nice.
>
> On Nov 7, 11:01 pm, Wes James wrote:
>
> > Massimo,
>
> > I thought I'd try some web2py with that site below:
>
> >http://db.nr.usu.edu/qpacn
>
I have not tried it, but it looks safe to integrate because it should
not result in 'exploding indexes' which was the main limitation of
SearchableModel.
Robin
On Nov 2, 12:45 pm, mdipierro wrote:
> a friend pointed me to this:
>
> http://www.billkatz.com/2009/6/Simple-Full-Text-Search-for-App-
ect 1000 records for downloading. Sounds not
> smooth, but it is the only way. :-/ Perhaps I shall consider using
> other slicehost etc. m
>
> On Nov2, 10:15am, Robin B wrote:
>
> > Take a look at the appengine bulk loader:
>
> >http://code.google.com/appengine/doc
Take a look at the appengine bulk loader:
http://code.google.com/appengine/docs/python/tools/uploadingdata.html
Once you have the data locally as csv, you can load it into a sql
database by writing a script to import it into web2py.
Robin
On Oct 31, 10:48 pm, mdipierro wrote:
> It works on GA
g itself and the entire web2py app gets cached?
>
> Massimo
>
> On Oct 30, 12:30 am, Robin B wrote:
>
> > Looks like google exponentially backs off a task when it fails, so
> > here is a version that uses eta to schedule the next task 10s in the
> > future.
>
> >
07 /_ah/queue/default 200 44ms 35cpu_ms
10-29 10:26PM 41.017 /_ah/queue/default 200 24ms 12cpu_ms
Literally like clock work, a task hits your app once every 10 seconds.
Robin
On Oct 29, 11:47 pm, Robin B wrote:
> I looked at the docs and came up with this code:
>
> ### some
On Oct 29, 10:16 pm, Robin B wrote:
>
> > > neat - now I get it. That's a nice hack!
> > > Did you find that out from the Google App Engine group, or thought of
> > > it yourself?
>
> > Thought of it myself.
>
> > Robin
>
> > On Oct 29, 12:
e Google App Engine group, or thought of
> it yourself?
>
> Richard
>
> On Oct 29, 10:29 am, Robin B wrote:
>
> > > The docs say a task will run when resources are free. In your
> > > experience do the tasks generally run on time?
>
> > Yes, they are tr
Your tables do not not show up until data is inserted because GAE does
not create any tables, ever. It uses BigTable which stores your app's
data and everyone else's app's data in 1 giant shared distributed
table. There is only one table in appengine and it is BigTable, thus
the name.
When you
king the task queue to accomplish a specific goal of calling the
task periodically since tasks can run much more frequently than cron
which is necessary to keep a handler 'hot'.
Robin
>
> Richard
>
> On Oct 28, 11:23 pm, Robin B wrote:
>
> > Oops typo: I said cron
cron be fast enough
> (at 1/sec)?
> Task queue is labelled experimental so I am wary to use it at the
> moment.
>
> Richard
>
> On Oct 28, 4:13 pm, Robin B wrote:
>
> > > How long does it stay cached?
>
> > Inactive Python handlers used to last ~1 minute,
> How long does it stay cached?
Inactive Python handlers used to last ~1 minute, recently it is closer
to 15 seconds.
Java servlets last longer, over a minute, maybe becuase they are so
slow to boot (6 seconds +).
One of the coming releases is supposed to speed up the cold boot
times.
Cron has
If you have been running an application on GAE in production, and you
inspect your logs, you should have noticed spurious 'Datastore
Timeout' exceptions resulting in HTTP 500 errors / tickets. These
Timeouts are inherent to distributed systems like BigTable and can
often be resolved by simply ret
The equivalent for field.belongs('A','B','C') is like field=='A'||
field=='B'||field=='C' on GAE you can do AND (&&) but not do OR (||),
so it can be done using 3 separate queries and append/unique the
results. On GAE you need to think in terms of what query is cheap at
request time, and merging
GAE now has support for query and orderby id, but nobody has exposed
it to the DAL yet! If you do a search for "__key__" on the web2py
mailing list, you can see that I have pointed this out over 3 times.
http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html#Queries_on_Key
ask Queue above at least this way you can do it slowly
> and not eat up to much CPU time. In the future I hope to upload new
> data first, and then slowly delete old data to avoid having to buy
> extra CPU time.
>
> On Oct 15, 3:30 pm, Robin B wrote:
>
> > You could look at
If you need to use a transaction, you could still do it using web2py:
from google.appengine.ext import db as gaedb
def txn():
counter = db.counters[cid]
if counter:
counter.update_record(count = counter.count+1)
return counter
counter = gaedb.run_in_transaction(txn)
print co
You could look at the task queue to build a more dynamic version of
what you are doing with cron polling.
Also tasks can execute in parallel, so instead of 30,000/200 units of
time to delete, you can do (30,000/200)/N where N is the level of
concurrency you set for your task queue.
Robin
On Oct
If you want to keep it normalized, and the intersection is less than
1000 entities, and joined by a primary key (ID), use a batch get, to
fetch all the join items in parallel.
If you are going to de-normalize, take a look at google ListProperty.
Robin
On Oct 6, 9:59 am, "Michael - afewtips.com"
GAE has added a feature so you can query by id or keyname (using
__key__), it is not implemented in DAL yet.
http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html#Queries_on_Keys
Robin
On Oct 5, 8:07 am, mdipierro wrote:
> GAE is very weird. It does allow queries that
Try not checking for 'POST' or chat, to see if there is a problem with
those checks:
def message():
import logging
message = request.vars
logging.debug(str(message))
from google.appengine.api import xmpp
user_address = 'chrisjmurr...@gmail.com'
xmp
, murray3 wrote:
>
> > this is just a test of your code:
>
> >http://testhogg.appspot.com/init/default/sendhttp://testhogg.appspot
>
> > i guess you just browse to /send and then browse to /chat which asks
> > for login
> > but prints "none"
>
> > also
> One entity group per web2py object, lack of list property support,
> etc. dooms the current implementation to "small" web sites. If db.py
> has no tables, will the "Web2py also re-evaluates your model
> definition" overhead vanish?
Yes, and to be practical, there is not much overhead. I was t
request, but then you only rebuild
the models that you actually use for each request, which is ideally no
models for a cached response.
Robin
On Sep 30, 1:08 pm, mdipierro wrote:
> On Sep 30, 1:01 pm, Robin B wrote:
>
> > > so i guess the next question is, do i have anything
> so i guess the next question is, do i have anything to worry about
> when using web2py on app engine per data model efficiency?
I am not sure what you are asking exactly.
If you use several tables and references, without list properties and
batch get, you would see the N+1 query problem de-re
> Massimo or anyone familiar with app engine, i am beginning development
> with bot app engine and web2py and have reviewed much of the google io
> videos especially those by bret slatkin regarding how to work with the
> app engine datastore properly. I hope but am guessing it is probably
> not th
to gql.py and add any other
features they need.
Robin
On Sep 27, 10:51 pm, mdipierro wrote:
> On Sep 27, 9:50 pm, Robin B wrote:
>
> > > exactly. To get optimized code on both platforms I currently need to
> > > use:
>
> > > if request.env.web2py_runtime_gae:
> exactly. To get optimized code on both platforms I currently need to
> use:
>
> if request.env.web2py_runtime_gae:
> records = [db.test[id] for id in test_ids]
> else:
> records = db(db.test.id.belongs(test_ids)).select()
>
> So what I am suggesting is the DAL support "belongs" for GAE b
> I get an error for orderby=~db.test.field - is it just reverse order
> that is not supported? I didn't see this mentioned in the manual.
Reverse order is supported, orderby=~db.test.field, orders descending
where 'field' is a field in your table.
eg. orderby=~db.test.title to order by title fi
On Sep 26, 11:20 pm, Richard wrote:
> I have been playing with GAE for the first time and found using it
> with web2py a pleasure. web2py and GAE are a killer combination!
>
> A few questions:
>
> How do you order your items? Currently I am selecting and then sorting
> in Python manually.
You
es.py.
Robin
On Sep 26, 6:32 pm, mdipierro wrote:
> Nice Robin,
> why split it over two apps (init and _ah)?
>
> On Sep 26, 6:17 pm, Robin B wrote:
>
> > how about something like this:
>
> > To send:
> > applications/init/controllers/default.py:
>
> > de
sic skeleton app for this to get us started?
> chrism
>
> On Sep 24, 5:44 am, Robin B wrote:
>
> > If you port it to web2py, then you don't need to wrap their handler,
> > unless I am misunderstanding.
>
> > All that has to built a web2py controller function th
nderstand how to wrap the handler so that I
> can be called from a controller function. We could make a wsgi_adaptor
> inside the controller but there has to be a better way.
>
> On Sep 23, 3:57 pm, Robin B wrote:
>
> > Yes,
>
> > I believe the url ('/_ah/x
it should be possible to rewrite the entire example as a web2py
> application. Is there specific significance it the URL names ('/_ah/
> xmpp/message/chat/') used in the example? Because preserving those
> would require roots.
>
> Massimo
>
> On Sep 23, 2:25 pm, Robin
t;
Robin
On Sep 23, 8:01 am, mdipierro wrote:
> What's a IM field?
>
> On Sep 22, 10:13 pm, Robin B wrote:
>
> > You can edit app.yaml to dispatch requests to those xmpp handlers
> > based on prefix (/_ah/*), and let web2py handle everything that's left
> >
You can edit app.yaml to dispatch requests to those xmpp handlers
based on prefix (/_ah/*), and let web2py handle everything that's left
(/*)
Or you can rewrite those handlers as web2py controller/functions and
use routes.py to map the specific urls to app/controller/function
Robin
On Sep 22, 5
ot be used because it is O
(n) and also does not work beyond 1000 rows.
Robin
On Sep 20, 12:54 pm, notcourage wrote:
> Are you implying that the GAE DAL could profit from new exceptions for
> BigTableDownForMaintenance & BigTableTimeOut?
>
> On Sep 19, 11:12 am, Robin B wrote:
>
n as to how I go about that? With the 1000 entity limit on
> selects I'm trying to think now how to best find only duplicates.
> Unfortunately I didn't put any 'time' variables in the table. I'm
> open to suggestions.
>
> On Sep 19, 8:02 pm, Robin B wrote:
ve the
entries, you might instead create a brand new table with a different
name somehow.
>
> Thanks for pointing out where I can find info on what the web2py
> fields translate to in datastore terms. That will help me insure I
> don't have an issue with that in the future.
>
W
> Looking over two tables here are the things I've identified as
> possible problems:
> 1 - This table has a 'double' in it. Not just int/string like the
> working one. For GAE uploading I defined the double field as a GAE
> "float" property. Is it possible web2py defines a 'double' as
> someth
gae, debug) = \
('gae:production', True, False)
Robin
On Sep 19, 8:19 am, notcourage wrote:
> Is there a variable which distinguishes dev & production for gae? It
> would simplify deployment.
>
> On Sep 18, 3:46 pm, Robin B wrote:
>
> > To s
The GAE DAL does not try to handle the 1000 fetch limit. GAE apps
must be designed differently, meaning if you need more than 1000
results from a query, then probably what you were attempting to do is
not scalable. Queries are O(#results), so you should keep your
queries small to make your reque
To send mail locally, you need to specify the mail server to be used:
http://code.google.com/appengine/docs/python/tools/devserver.html#Using_Mail
Robin
On Sep 17, 11:02 pm, notcourage wrote:
> I can send email after deploying to gae but not in the dev env.
--~--~-~--~~
Install Python 2.5 (GAE requires 2.5) and try again.
Robin
On Sep 17, 5:14 pm, notcourage wrote:
> I'm using Vista.
>
> create c:\swe\notcourage-guestbook folder
> extract webpy here (don't run web2py.py)
> edit app.yaml
> create applications folder here
> create init folder here
> copy my app'
machine, and you can iterate over
all rows and ensure they have a float random field.
Robin
On Sep 10, 1:11 am, Richard wrote:
> neat!
>
> On Sep 10, 3:32 pm, Robin B wrote:
>
> > On GAE, the default ordering depends on which index is needed to
> > answer the query, and it
On GAE, the default ordering depends on which index is needed to
answer the query, and it is stable, so it is non-random.
To get random rows on GAE, I use a float field called random, which is
assigned a float from 0 and 1, then to pull random rows, I just
generate a random float and query by tab
You can access the 'table._tableobj' which is the generated GAE Model
object, however this is not a public interface and not subject to
backwards compatibility.
Posts = db['posts']._tableobj
Posts.get_by_id(long(id))
Robin
On Aug 21, 3:45 am, dlypka wrote:
> Here are my GAE DALnr snippets.
>
> Assuming this can be done... are we sure that accessing S3 via REST
> from GAE does not exceed the time limit?
If I remember correctly, you can stream uploads directly to S3, which
bypasses GAE and avoids any timeout. So from GAE, at request time,
you ask S3 for a unique upload url, then POST
cts".
>
> > Is it a bug?
>
> > Thanks!
>
> > Tito
>
> > On Sun, Jun 7, 2009 at 11:18 AM, Tito Garrido wrote:
> > > Thank you folks,
>
> > > I'll try appcfg.py update_indexes myapp/ to test... localy it works
> > > perfectly.
>
The easiest way to fix this is to exercise your app on the development
server, (use the query that needs that missing index) which will add
the missing index to the generated index.yaml. The next time you
update/deploy your index.yaml to production, GAE will 'build' the new
index which takes time
To add the email/password, try these switches with appcfg.py:
--email=...
--passin
http://code.google.com/appengine/docs/python/tools/uploadinganapp.html#Command_Line_Arguments
Robin
On Apr 28, 5:03 pm, mdipierro wrote:
> would somebody be able to send a piece of Python code to
> programmatic
I am also not happy with the CGI performance of GAE.
Some interesting numbers:
welcome/default/index:
cold request time: ~1500ms
warm request time: ~150ms (about 1/10 time of a cold request)
a warm process is reaped in just *60 sec* if there is no activity.
If you have a low activity site, w
Some ideas:
There is a log_stats decorator in gaehandler.py that can be
uncommented and enabled in production to give a more precise timing
profile than the log coarse timing.
The main caching mechanism is in compileapp.py and the compiled code
should be cached in a dict called 'cfs' which can b
> it detects GAE it will cache bytecode compiled models and actions. I
> just tried and it works.
>
> Massimo
>
> On Apr 13, 10:09 am, Robin B wrote:
>
> > Looks good, but I tried inspecting 'cfs' to verify that it is caching
> > the ccode:
>
> > in c
ot;"" Request: %.2fms/%.2fms (real time/cpu time)"""
Robin
On Apr 13, 12:07 am, mdipierro wrote:
> OK. done. check the trunk and let me know what you think. I am also
> reposting this as 1.61 for now because 1.60 may be broken on GAE.
>
> Massimo
>
>
. Please give it a try. If the imp.get_magic
> works on gae then web2py may have been slower on GAE that it is
> supposed to be. This should fix it.
>
> Massimo
>
> On Apr 11, 7:59 pm, Robin B wrote:
>
> > I am not sure if that is true or not.
>
> > To test for G
I am not sure if that is true or not.
To test for GAE, I would set 'is_gae' to True in gaehandler.py to
achieve fool-proof detection.
To detect production/debug on GAE, I use this in 0.py:
response.debug = os.environ.get('SERVER_SOFTWARE','').startswith
('Devel')
Robin
On Apr 11, 2:59 pm, mdi
I thought it would be cool to have a routes.py for each application,
so I put the following in web2py/routes.py, which combines the routes
from each application/*/routes.py at boot time.
web2py/routes.py:
from gluon.fileutils import listdir
import os,glob
apps_with_routes = []
app_routes = glob.
No one has published a 'RAMDB' (a DAL driver for RAM). It could
easily be implemented as a global dict, and it could be useful for say
caching, but I would not put sessions into ram for production. If you
have more than 1 application server/process, you will not be able to
share sessions between
I have been using MEMDB to store sessions in memcache since August
2008:
http://groups.google.com/group/web2py/browse_thread/thread/cd89f11de4d23b53/f67faac66a695ca2?hl=en&lnk=gst&q=memdb#f67faac66a695ca2
the code is under contrib:
from gluon.contrib.memdb import *
from google.appengine.api.mem
If you need an ORM, you can wrap the DAL inside an ORM. I believe
that is how SQLAlchemy works (models and schemas). That way your ORM
gets the benefit of DAL abstraction. If you can design a usable ORM
model that wraps the DAL, others might also be interested. Web2py is
built in layers, the D
You must use transactions to atomically increment any counter shard.
Web2py does not have transactions yet, so just use google models for
the sharded counters, and increment/sum them inside/after form.accepts
().
Robin
On Mar 2, 6:11 pm, Jim wrote:
> In the first message, I give a reference to
The obj_represent/datetime code was modified after 1.56.2. I would
check if this problem is present in 1.56.2 and if the gql.py doctests
still pass on trunk.
Robin
On Feb 26, 10:21 am, mdipierro wrote:
> I missed the part where you said this problem was on GAE.
>
> Robin? Do you have anything
It looks like a problem converting datetimes to/from strings?
Robin
On Feb 23, 9:21 am, mdipierro wrote:
> Robin,
>
> what is the bug?
>
> Massimo
>
> On Feb 23, 9:04 am, Robin B wrote:
>
> > Looks like the type coercion code was last modified in r725.
>
&
To really fix this, requires runtime configuration, but web2py does
not have configuration, so the down side is that configuration is
sprinkled throughout the app with if/else, try/except, comment/
uncomment. I agree that a standard configuration would be more
maintainable.
Robin
On Feb 23, 9:0
Looks like the type coercion code was last modified in r725.
http://code.google.com/p/web2py/source/diff?spec=svn743&r=725&format=side&path=/trunk/gluon/contrib/gql.py&old_path=/trunk/gluon/contrib/gql.py&old=718
If the bug is not in 1.56.2, try using 1.56.2 until this can be fixed/
patched.
Ro
, 11:13 am, "Sebastian E. Ovide"
wrote:
> On Fri, Feb 20, 2009 at 12:36 AM, Robin B wrote:
>
> > I have the transactions working, but it is not fully compatible with
> > web2py DAL, but it could be soon ( needs type coercion, db.table.ALL,
> > etc) Also in
I think this is very well done. The autoupdating gives instant
feedback.
To get it working on appengine, I had to add:
models/0.py:
session.forget()
Because web2py was trying to write sessions to the filesystem.
Congratulations on releasing this great tool!
Robin
On Feb 19, 2:51 pm, black
;
> is there any schedule for the GAE transactions/entity groups ?
>
> if not, how would it be the best way (web2py upgrades compatible !) to
> use entity groups and transaction with web2py ?
>
> thanks
>
> On Jan 19, 2:59 pm, Robin B wrote:
>
> > > Groups
SearchableModel is workable as long as you have 1 or at most 2 words
in the search, otherwise the indexes 'explode' in size. You should be
able to mark a field as non-indexed, and non-ascii fields should be
non-indexed by default. If there were some doctests, this could be
added to gql.py.
Robi
> r=db(db.cas_user.id==id).select() #OK
> r=db(db.cas_user.verification==key).select() #OK
> r=db(db.cas_user.id==id)(db.cas_user.verification==key).select() #OK
> but not on GAE
Google added query/sort by id in a recent SDK release, and the new GAE
driver that I am writing supports it, so this q
it in
> gluon.tools
>
> Massimo
>
> On Jan 30, 1:20 pm, Robin B wrote:
>
> >web2py.urlfetch, works on every platform :)
>
> > Robin
>
> > On Jan 30, 1:13 pm, mdipierro wrote:
>
> > > make a proposal. It is not easy to auto-detect gae since y
-with-google-app-engine
Robin
On Feb 10, 2:30 am, ANDROSoft wrote:
> This error exist only in itemize and when items in table must be
> paginated. When i set nitems>count(items in table) everything is
> working. Search form is working ok.
>
> On Feb 9, 1:28 pm, Robin B wrote
I think you are misunderstanding the error message.
BadValueError: Property size must be a float
The error message is saying you must pass in a 'float'ing point
number, and 0 is not a floating point number.
# This does not work
gdb = GQLDB()
gdb.define_table('potato',gdb.Field('size','double',d
And its fully transactional when you pass callable args, all the
drivers will get it for free because it is not done at the driver
level.
Robin
On Feb 8, 3:46 pm, Robin B wrote:
> I think in SQL you can use '|' to generate each in 1 query.
>
> Robin
>
> On Feb 8, 3:44 pm, mdip
It appears like it is trying to call str(query) where the query does
not have a left operator.
what happens if you change this: gql.py:591:
def __str__(self):
return str(self.left)
to this: gql.py:591:
def __str__(self):
return str(getattr(self,'left',''))
Robin
On Feb
Robin
On Feb 8, 5:48 pm, mdipierro wrote:
> should this be in web2py? Pros/cons?
>
> Massimo
>
> On Feb 8, 5:38 pm, Robin B wrote:
>
> > Here is another version of mod_import() that does not use string
> > splitting:
>
> > def mod_import(name):
> >
ot; wrote:
> Ooooh! starting to look yummy... :-)
>
> On Thu, Jan 8, 2009 at 1:04 PM, Robin B wrote:
>
> > > def mod_import(name,request=None):
> > > if request: name='applications.%s.modules.%s' %
> > > (request.application, name)
> >
I think in SQL you can use '|' to generate each in 1 query.
Robin
On Feb 8, 3:44 pm, mdipierro wrote:
> In principle I am for all of these but I am not sure they can be
> implemented easily in SQL without loops. Can they?
>
> On Feb 8, 3:39 pm, Robin B wrote:
>
&g
We could add select and delete to tables and limitby could have a
shortcut:
instead of:
(db.posts.id>0).select(orderby=~db.posts.created_at,limitby=(0,10))
how about:
db.posts.select(orderby=~db.posts.created_at, limitby=10)
batch get:
db.posts.select([3,5,9])
and delete could also accept kwar
7;posts')
posts._tablename -> '_shared__posts'
Robin
On Feb 7, 12:03 pm, Robin B wrote:
> Namespaces can also be generalized by unifying under the DAL:
>
> dal = DAL()
> dal.define_namespace('app',request.application)
> dal.define_namespace(
7;gaedb','google')
dal.shared.gaedb.define_table('posts',dal.Field('title'))
db = dal.shared.gaedb
db.posts._tablename -> '_shared__posts'
Robin
On Feb 7, 11:40 am, Robin B wrote:
> And what about this:
>
> dal = DAL()
> dal.define_database
isk = CacheClient(db=dal.fsdb)
@cache(request.env.path_info,time_expire=5,cache_model=cache.mem)
def cache_controller_in_ram():
import time
t=time.ctime()
return dict(time=t,link=A('click me',_href=URL(r=request)))
Robin
On Feb 7, 11:25 am, Robin B wrote:
> I am implement
I am implementing the joins on GAE, and I realized that you should be
able to perform joins between DAL databases whether it is the same
driver or not.
fsdb = FSDB(...,name='fsdb')
gaedb = GAEDB(...,name='gaedb')
rows = ((gaedb.users.name=='bob')&
(gaedb.users.id==fsdb.users.id)).select(fsdb.use
On Feb 7, 9:11 am, mdipierro wrote:
> I assume this is in your latest patch. I will try apply it during the
> week-end.
>
> On Feb 7, 8:39 am, Robin B wrote:
>
> > update() and update_record() should accept callables:
>
> > def txn(record):
> > attrs
update() and update_record() should accept callables:
def txn(record):
attrs = {}
if record.name == 'bob':
attrs['count'] = record.count + 1
elif record.name == 'alice':
attrs['count'] = record.count - 1
return attrs
#complex transactions
(db.posts.id>0).update(txn)
# simple tra
uestions:
>
> Isn't the plan to do away with gql.py?
>
> Does the query class encapsulate sql or is it a different syntax? (I
> know I'm being lazy here I will look it up)
>
> On Feb 1, 10:29 pm, Robin B wrote:
>
> > Yes it is ignored.
>
> > Some of the
1 - 100 of 200 matches
Mail list logo