Hi guys, I've found the following functions to be commonly useful in
practice. Has anyone else written anything similar? Is there a better
idiom here, or better names or interfaces for these?
def get_one(query):
result = db(query).select()
assert len(result) = 1, GAH get_one called when
single_record = db(query).select().first()
if not single_record:
print no record
else:
print record!, single_record
You can also do
db(query).count()
db(query).select().last()
-Thadeus
On Tue, Mar 16, 2010 at 3:45 PM, Michael Toomim too...@gmail.com wrote:
Hi guys, I've found the
I have functions in my controller that require no view and should be
inaccessible through the browser, i.e: helper functions, callbacks,
etc
If the user tries to access the function through
http://../app/controller/function,
I'll either get an 'invalid function' or the return values.
How do I
3 matches
Mail list logo