pls try :
query = (db.payslip.state == 'Confirmed')
sum = db.payslip.gross.sum()
print db(query).select(sum).first()[sum]
*ref:*
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#sum--avg--min--max-and-len
best regards,
stifan
--
Resources:
- http://web2py.com
-
a, i c, thank you so much for your detail explaination and reference,
anthony.
thank you so much for your hints and suggestion, anthony and pbreit. i'll
figure it out my wrong code.
pardon, me, what's cid used for? is it mandatory to use trap?
thank you so much.
your example is work fine on me, anthony, thank you so much, but when i
tried to implement on my application it returns an error.
e.g. 1.
def __add_2(table_0, index_link, table_1, field):
page = table_0(request.args(0)) or redirect(URL(index_link))
response.js = 'web2py_component(action =
thank you so much for your explaination about onaccept argument,
anthony, yeah, i admit my failure code on the e.g. 2 but in e.g.1. the
result is same no error appears just never ending loading... on the list
view comments component.
On Sun, Jun 12, 2011 at 7:15 PM, Anthony abasta...@gmail.com
pardon me, btw, what is the function of ajax_trap = True? what can do by
ajax_trap = True?
thank you so much.
a, i c, thank you so much for your explaination and example code, sahil. did
you mind if i want to store the video file and image in the database as
blob? how to do it?
thank you very much before.
a, i understand, right now, thank you so much for your explaination, massimo
honestly, i'm newbie in programming both in python and web2py, actually i'm
using chrome and use developer tools, but, i don't know how to trace back my
error component elements, any suggestion? i will redevelop my code from
scratch again, as your suggested to start from simple. if you want to
a, it's clear for me know, thank you very much for your detail explaination
and reference, anthony, i think this is the answer about my ajax component
problems question, sorry, oot in the wrong room. again, thank you so much.
On Mon, Jun 13, 2011 at 7:53 AM, Anthony abasta...@gmail.com wrote:
thank you so much for corrected my mistook code, anthony, but the results is
same now the blog comment show appears loading... First time my incorrect
code show the blog comment form page appears loading... and then right now
the blog comment show. actually i come from the simple things one
thank you so much for your shared, massimo.
thank you so much for your hints, anthony, i've already move out the hidden
class div but got the same results, the components show as a loading
i don't know where is the problem.
thank you so much for your hints, anthony, but, pardon me, the results on
the form components is loading..., the page didn't show an error, but keep
loading..., is there something i missed in my code?
e.g.
*=== controller ===*
blog = db.blog
blog_comment = db.blog_comment
blog_comment_blog_id =
how to integrate web2py with ffmpeg? i mean when users uploaded the video,
web2py can automatic reproduce the image and store it in the database. is
there any way to do this?
thank you so much.
yes, i have.
def blog_comment_show():
return
__show_2(blog, blog_index, blog_comment, blog_comment_blog_id,
blog_comment_active)
@auth.requires_login()
def __show_2(table_0, index_link, table_1, field, active):
page = table_0(request.args(0)) or redirect(URL(index_link))
results =
pardon me, what is the meaning of *args and **vars?
thank you.
a, i c, pardon me, if i'm not wrong massimo said he will get the book update
on this august. so that i confirm it, hehe...
glad to know that, thank you so much.
nice info, will try and take a look, thank you.
it works on me too, pbreit, thank you so much. when i use the simple it
works fine, but when i try to expand it (i mean using components, ajax and
jquery it's not work).
On Thu, Jun 9, 2011 at 5:11 AM, pbreit pbreitenb...@gmail.com wrote:
It worked for me with a normal query:
great job, szimszon, thanks for sharing and announcing it. happy web2pying.
On Wed, Jun 8, 2011 at 4:41 PM, szimszon szims...@gmail.com wrote:
I updated the app and uploaded the new already to
http://web2py.com/appliances/default/show/78
Changelog
110608
- data about the file
is the book has already been updated right now?
thank you
had you already normalize your database table?
On Tue, Jun 7, 2011 at 9:03 PM, Neveen Adel nevo.a...@gmail.com wrote:
Hello,
I have table has 30 field, so for readability i want to using tabs
and each tab include 10 fields and allow the user to switch between
them and at the end there is
good job, everyone, hope web2py improve day by day, thank you so much.
\(^o^)/
hi, massimo
did you have the documentation for do this?
thank you so much
On Tue, Jun 7, 2011 at 5:15 AM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
look into gluon/contrib/comet_messaging.py
On Jun 6, 5:08 pm, blackthorne francisco@gmail.com wrote:
hi
Let's say I have a
is it possible to use belongs to replace IS_IN_SET validation in database
definition?
thank you
On Tue, Jun 7, 2011 at 7:29 AM, pbreit pbreitenb...@gmail.com wrote:
belongs:
http://web2py.com/book/default/chapter/06#belongs
a, i c, i mean in database definition that have field type list:string, have
the valid value that is describe in belongs, is it possible or not?
thank you.
On Tue, Jun 7, 2011 at 7:58 AM, pbreit pbreitenb...@gmail.com wrote:
I'm not sure I understand the question. Validators apply to forms.
i think notnull = TRUE is same like requires = IS_NOT_EMPTY()
a, i c, pardon me and thank you so much for correcting me, anthony.
On Mon, Jun 6, 2011 at 9:00 AM, Anthony abasta...@gmail.com wrote:
On Sunday, June 5, 2011 9:52:23 PM UTC-4, 黄祥 wrote:
i think notnull = TRUE is same like requires = IS_NOT_EMPTY()
Not exactly -- notnull=True is enforced
thank you so much for your hint, pbreit, i'd already put an id on the
controller.
e.g.
page = table_0(request.args(0)) or redirect(URL(index_link))
any idea, hints or suggestion to solve this problem?
thank you so much in advance.
On Fri, Jun 3, 2011 at 9:12 PM, pbreit pbreitenb...@gmail.com
o, i c, thanks so much for showing my code fault, pbreit, i'll try to fix
and test it.
On Sat, Jun 4, 2011 at 5:02 AM, pbreit pbreitenb...@gmail.com wrote:
I'm not sure exactly how your code works but I'd didn't seen an arg in this
load:
{{=LOAD('default', 'blog_comment_show.load', ajax =
thank you so much for your hint and correction, massimo, it works, now.
web2py is so cool
On Sat, Jun 4, 2011 at 9:28 AM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
ajax('blog_like',...
should be
ajax('{{=URL('blog_like.load')}}',..
hi,
i have an ajax run unexpected in
what is the differences between gluon.contrib.urlify and
IS_SLUG..urlify(...)?
is it same? which is the best for use?
thank you so much
On Thu, Jun 2, 2011 at 7:12 PM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
Oops we are not talking about the same thing. Looks like there is some
very cool, massimo, hope you can share it, so that we can learn from it,
thank you so much.
On Fri, Jun 3, 2011 at 4:03 AM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
I have it somewhere. I will post it on web2py appliances asap.
On Jun 2, 3:06 pm, François gustave5...@gmail.com
congratulation, nice application szimszon, had already put in the
appliances?
please go to
http://web2py.com/appliances/default/edit/http://web2py.com/appliances/default/user/login?_next=/appliances/default/edit
you
will asked to login with janrain, after that, you can upload and share your
application in there. great job, happy web2pying zimszon
\(^o^)/
a, i understand right now, it seems so widely implementation for rpc, thank
you so much for sharing
?
I would like to try it;
Thanks.
On 6/1/11 10:48 AM, Stifan Kristi wrote:
a, i understand right now, it seems so widely implementation for rpc,
thank you so much for sharing
thank you so much for your hints, i'm using select input with 3 options,
public, private and protected, on the form. so when user choose the
protected value the field password will appears. i just modified what was
written on the book. any idea?
thank you so much in advance.
On Thu, Jun 2, 2011
a, i'm quite understand right now, thank you so much for your explaination,
all.
awesome, great job, everyone, thank you so much
a, so that's what slug used for, thank you so much for your sharing, pbreit. at
first i read in the book, and don't know, what slug is use for.
On Thu, Jun 2, 2011 at 6:08 AM, pbreit pbreitenb...@gmail.com wrote:
I create and decode slugs on-the-fly so that my URLs are more
descriptive:
pardon me, what urlify is use for? i've already search in the book but
return a null. thank you so much.
On Thu, Jun 2, 2011 at 7:29 AM, pbreit pbreitenb...@gmail.com wrote:
There's a validator if you want to save a slug to the DB:
http://web2py.com/book/default/chapter/07?search=IS_SLUG
a, i see, thank you so much for your explaination, massimo.
On Thu, Jun 2, 2011 at 7:59 AM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
Converts text into a SLUG.
On Jun 1, 7:32 pm, Stifan Kristi steve.van.chris...@gmail.com wrote:
pardon me, what urlify is use for? i've already
very cool, congratulations, keep happy web2pying...
thank you so much for your detail explaination and reference, pbreit.
On Wed, Jun 1, 2011 at 6:48 AM, pbreit pbreitenb...@gmail.com wrote:
The two are mostly unrelated.
uuid is a python library that you generally don't need to use or worry
about. It basically generates a unique string.
Thank you so much for your detail explaination, example and reference,
pbreit, honestly, i'm new in this feature, and don't know what is the use
for when i follow the guidance in the book, now, my mind is open and i'll
learn it on the book.
On Wed, Jun 1, 2011 at 8:46 AM, pbreit
congratulations for complete your course, happy web2py forever...
\(^o^)/
great, nice application, hope you win the competition
\(^o^)/
lol, i think everything will be fine, long live massimo and web2py, both are
nice...
had already checked web2py appliances? http://web2py.com/appliances
On Wed, May 25, 2011 at 1:19 PM, Markandeya mrc55...@gmail.com wrote:
Dear Friends of Web2Py,
I am just getting started and need an example application using a
relational database. A possible example:
1) with customers,
i think the logic is same like wizard, have you tried it?
On Wed, May 25, 2011 at 7:39 AM, Ialejandro ialejandr...@gmail.com wrote:
Hi everyone, I'm trying to make an app where a user can create its own
tables bases in some attributes, I have this:
View:
{{extend 'layout.html'}}
form
thank you so much for your detail explaination and example miguel, i'm
really appreciate it. i'll follow what you n massimo suggest to put the
logic in the controlller. should i change it for example in the example
before.
e.g.
from :
=== view ===
{{for i, row in enumerate(rows):}}
{{if i ==
thank you so much for your replied marin, my intention is to show up blog
comment form in the blog index, so that while the user see blog, they can
comment it in 1 page. actually i have 2 form in blog index, 1 is for pass
the hidden id when user click like. i just learn it from :
hi pbreit,
html source was fine, the strange things, that the form can be submit after
i put {{pass}} or {{continue}} after i declared the form, but i don't want
to put {{pass}} or {{continue}} because the whole code after i put {{pass}}
or {{continue}} is not working, any ideas, hints or
same for me, still confuse about exact comparation between SQLFORM and CRUD,
plus and minus side overview, but i usually use CRUD, because it's simple
(just my opinion).
On Mon, May 23, 2011 at 7:39 AM, Ismael Alejandro ialejandr...@gmail.comwrote:
Hi apple! I'm my own experience (may me I'm
hi pbreitenbach,
my controller not create any form, i just create it on the view side,
because i'm using the variable that produced by for loop in view side, that
i can't do it in controller side. at the book there is no examples for
creating the form in view, just the other one that i use (i
thank you so much for your hint, massimo, i want to follow your advice to
put the logic in controller but, i can't , because i'm using the variable
that produced by for loop in view side, that i can't do it in controller
side. do you have any solutions to put the logic in controller side that
have
need more control.
The good thing is that they have a log overlap and you can always
change one for the other.
On May 22, 7:50 pm, Stifan Kristi steve.van.chris...@gmail.com
wrote:
same for me, still confuse about exact comparation between SQLFORM and
CRUD,
plus and minus side overview, but i
AM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
a *lot of* overlap.
On May 22, 8:08 pm, Stifan Kristi steve.van.chris...@gmail.com
wrote:
log overlap? is it for CRUD? i've already checked in web2py.com/bookthat
the log is related with crud.message? please correct me if i'm wrong
a, i c, thank you so much for your suggestion pbreit.
On Mon, May 23, 2011 at 9:52 AM, pbreit pbreitenb...@gmail.com wrote:
I'd suggesting adding an element:
http://web2py.com/book/default/chapter/07#Adding-extra-form-elements-to-SQLFORM
Or customizing the form:
thank you for your replied luifran, but, it's not working, any example or
url maybe?
thank you very much before
On Sat, May 21, 2011 at 7:26 PM, luifran lbernalhernan...@yahoo.es wrote:
In the view must be for example {{=add}}
On 21 mayo, 12:00, 黄祥 steve.van.chris...@gmail.com wrote:
hi,
thank you so much for your hints and pointers pbreit, btw, an error occured
when i tried to do it.
e.g. 1.
=== controller ===
def index():
pages = db(db.page.id 0).select(orderby = db.page.title)
comments = db(db.comment.id 0).select()
for comment in comments:
i'm understand right now, thank you so much for your detail explaination ron
On Sun, May 15, 2011 at 2:08 PM, ron_m ron.mco...@gmail.com wrote:
In the core chapter of the book I found this:
In the above example, both request.args[i] and request.args(i) can be used
to retrieve the i-th
i've already tried to moved curly brackets {{ }} in the controllers and
still gettin an error, my intention is because all of my views is using
pagination and i want to simplified it to just put on the centralize db
functions.
is there any ways to do this?
thank you so much
On Sun, May 15, 2011
a, i got it, thank you so much for your detail explaination and example,
villas.
On Sun, May 15, 2011 at 5:27 PM, villas villa...@gmail.com wrote:
It is simply how that record id will be displayed when used in a
foreign key.
e.g.
table colors:
id: 1, name: red,
id: 2, name: yellow,
thank you so much for your hints and pointers denes pbreit, pardon me, i
just wan to show up all of the content of wiki page on index page and also
the comments that related with it. is there a way to do this?
i've already modified it into (learned from kenneth damian blog on
appliances):
def
great job, congratulations!
On Mon, May 16, 2011 at 2:51 AM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
Who did this? Congratulations!
http://sites.google.com/site/web2pyjapan/book/01
a, i'm understand right now, thank you so much for your detail explaination
all.
On Mon, May 16, 2011 at 12:51 AM, pbreit pbreitenb...@gmail.com wrote:
Just remember that the () method is unique to Web2py strorage objects and
cannot be used generally in Python.
Same for request.vars
thank you so much for your hints and pointers, pbreit. i've already read the
url, but still don't understand, what is the intent of the url. but i get it
what you've said, again thank you very much.
On Mon, May 16, 2011 at 12:44 AM, pbreit pbreitenb...@gmail.com wrote:
You could check out this
hi, massimo,
why u didn't also put japanese translation language on web2py default?
it's just a suggestion.
thanks
On Mon, May 16, 2011 at 8:04 AM, kenji4569 hos...@s-cubism.jp wrote:
Hi Massimo,
the site is recently developed by a member of web2py-japan, Nakagaki-
san. The book
it when the translation finished.
On 5月16日, 午前10:43, Stifan Kristi steve.van.chris...@gmail.com wrote:
hi, massimo,
why u didn't also put japanese translation language on web2py default?
it's just a suggestion.
thanks
On Mon, May 16, 2011 at 8:04 AM, kenji4569 hos...@s
i hope there are a lots of examples on the next book version. e.g. class
implement on models, modules, controllers. because people learned from the
book and sharpened it through testing and experience, especially when an
error occured. lol.
thank you so much.
thank you so much for your replied vasile, but, unfortunately is not going
to work because the syntax error related with
e.g. like this is return an error
comments = db(db.comment.image_id == image.id ** db.comment.is_active
== True).select(orderby = ~db_comment.id)
comments =
pardon me, it's my fault, i didn't realized the brackets, thank you so much.
it's solved now.
i'm understand right now, thank you so much for your detail explaination.
On Sun, May 15, 2011 at 5:02 AM, Anthony abasta...@gmail.com wrote:
On Saturday, May 14, 2011 5:37:39 PM UTC-4, 黄祥 wrote:
hi,
is there anyone can explain about the usage of default?
e.g. on
it's my fault, thank you so much for corrected me pbreit.
On Sat, May 14, 2011 at 10:16 AM, pbreit pbreitenb...@gmail.com wrote:
If you're going to do it in the view, you need some {{pass}} statements to
close up the for and the if blocks.
when the updates come, bruno?
is it for web2py package or web2py books?
i'll wait for both, thank you so much for your info.
On Thu, May 12, 2011 at 10:35 AM, Bruno Rocha rochacbr...@gmail.com wrote:
here:
http://web2py.com/book/default/chapter/04#Third-Party-Modules
a, i c, i followed the forum discussion too about web2py new version, but, i
think it'll be great if the new feature is well documented how to use,
combine and improve it.
btw, thanks for your info, anthony
On Thu, May 12, 2011 at 10:48 AM, Anthony abasta...@gmail.com wrote:
On Wednesday, May
thank you so much for your hints and pointers pbreit and bruno, i'll try
your advice.
thank you so much for your hints and pointers, anthony. i admited my fault
on the code, i've already corrected it and using that u've suggested but the
ajax function is still not working.
for components, i've already read it, i think components is not work in my
case, and that i caught on that
very nice, congrats and gud luck in your business...
if your functions is use with many controllers that related with database,
please put it on the models
if your functions is use with many controllers that not related with
database function, please put it on the controllers
if your functions is use by another application, please put it on the
so that's the reason ya, thank you so much for your detail explaination
pbreitenbach
On Mon, May 2, 2011 at 10:13 PM, pbreit pbreitenb...@gmail.com wrote:
It's unnecessary. Optionality is enforced by Web2py so it's not necessary
and less flexible to enforce it at the database level.
it's cool, congratulations
i'm understand right now, thank you so much for your detail reference,
pbreitenbach
On Sun, May 1, 2011 at 10:49 AM, pbreit pbreitenb...@gmail.com wrote:
Because sql.log only tracks define_tables(). As noted in the Book:
Currently the DAL API does not provide a command to create indexes on
Assef.
On Sat, Apr 30, 2011 at 11:30 PM, Stifan Kristi
steve.van.chris...@gmail.com wrote:
nice info, viniclusban, btw,
First, because web2py recommends you don't mix validators
with db.define_table().
is it the best practice to not mix requires on the same time with field
create?
e.g
i'd like your logic bruno, could you explain about the function, please?
000_essentials.py = what for?
100_authdatabase.py = what for?
200_dbmodel.py = what for?
300_validators.py = what for?
400_utilities.py = what for?
500_preload.py = what for?
thank you so much
On Sun, May 1, 2011 at 11:03
the plugins:
plugins_1.py
plugins_2.py
plugins_3.py
plugins_4.py
plugins_zindex.py (here the execution order of plugins)
2011/5/1 Stifan Kristi steve.van.chris...@gmail.com
i'd like your logic bruno, could you explain about the function, please?
000_essentials.py = what
something like this:
class Clients(object):
def show():
'show a list of clients'
def delete():
'delete ...'
def add():
'add ...'
2011/5/1 Stifan Kristi steve.van.chris...@gmail.com
thank you so much for your info, martin, i've already tried and learn from
thank you so much for your reference link jose
On Sun, May 1, 2011 at 9:52 PM, Jose jjac...@gmail.com wrote:
Hi,
You can see this:
http://www.web2py.com/book/default/chapter/06
[Self-Reference and Aliases]
Best Regards,
Jose
i'm understand right now, thank you so much for your detail explaination,
massimo
how about the performance difference between using single database or
multiple database? did you consider about it?
On Sat, Apr 30, 2011 at 7:51 PM, annet annet.verm...@gmail.com wrote:
@A I think your standardized groups will simplify things. However,
there is then some sacrifice of
villa...@gmail.com wrote:
On Apr 30, 2:14 pm, Stifan Kristi steve.van.chris...@gmail.com
wrote:
how about the performance difference between using single database or
multiple database? did you consider about it?
I don't think that's an issue for me because DBs have to be really
big, or large
In my experience even large DBs perform well when queries are on
indexed fields and it is much easier to manage data when it is in one
place.
i think indexed fields not every table must have it, because when you didn't
use it wisely it can drop your database performance. just indexed the
i'm understand right now, btw, the indexing is working, i'm just curious why
it's not log by sql log on web2py appadmin, thank you so much for your
explaination, breitenbach.
On Sun, May 1, 2011 at 8:00 AM, pbreit pbreitenb...@gmail.com wrote:
sql.log reflects SQL generated from the
nice info, viniclusban, btw,
First, because web2py recommends you don't mix validators with
db.define_table().
is it the best practice to not mix requires on the same time with field
create?
e.g.
db.define_table('category',
Field('category'
)
thank you so much for your suggestion, massimo.
On Sun, May 1, 2011 at 9:30 AM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
add this to your views
{{=BEAUTIFY(db._timings)}}
all queries will be there, timed.
On Apr 30, 8:00 pm, pbreit pbreitenb...@gmail.com wrote:
sql.log
1 - 100 of 188 matches
Mail list logo