Anyone could help?
terça-feira, 9 de Maio de 2017 às 13:20:56 UTC+1, Rúben Rodrigues escreveu:
>
> Hi people,
>
> I'm new in django, so i have simple questions. Sorry for that.
>
> I want to develop a simple app to make entries in stock. To start i
> install the jet dashboard and start an app
Hi people,
I'm new in django, so i have simple questions. Sorry for that.
I want to develop a simple app to make entries in stock. To start i install
the jet dashboard and start an app called polls:
https://ibin.co/3LmUv6rGJRXt.png
I want to add a entrie and inside i need to have a table
In addition to the above, you can have a field in your model, that
will contain that sum, and update it in your save(). It may not be as
beneficial with sum() as it is with some other functions that work on
multiple rows.
陈亮 wrote:
> Hi there,
> I've googled a lot on how to get the sum of a
On Sun, Apr 27, 2008 at 8:47 AM, Darryl Ross <[EMAIL PROTECTED]> wrote:
> I use:
>
>total = sum([obj.amount for obj in Model.objects.all()])
As of the merge of qsrf, this will also work:
total = sum(Model.objects.values_list('amount', flat=True))
Plus there's the SoC project which
陈亮 wrote:
Hi there,
I've googled a lot on how to get the sum of a integer field for all
the objects of a model. There are some solutions. But none of them looks
like a standard way to do so. Does django have this feature?
I use:
total = sum([obj.amount for obj in
Hi there,
I've googled a lot on how to get the sum of a integer field for all the
objects of a model. There are some solutions. But none of them looks like a
standard way to do so. Does django have this feature?
Leon
--~--~-~--~~~---~--~~
You received this
6 matches
Mail list logo