Following up: if it affects a single instance of an object, then it belongs
as a model method.
If it affects any number of them, then it should perhaps go on the manager
(or even the queryset: I use django-model-utils PassThroughManager for this
a lot).
Matt.
On Sunday, November 11, 2012
On Sat, Nov 10, 2012 at 6:15 AM, Tomas Ehrlich wrote:
> I usualy put methods like this one into Model, although Manager is also
> possible. Definitely not View or sth else.
definitely in the model.
you'd use it like this:
accnt = get_object_or_404 (Account,
Hi Kristofer,
I usualy put methods like this one into Model, although Manager is also
possible. Definitely not View or sth else.
Why I like Model more than Manager is this difference (suppose your
method is called make_payment):
Account.make_payment # via Model
Hello,
I'm new to Django and trying to learn it by making a simple budget/checkbook
application.
I apologize for my ignorance, but I couldn't seem to find an answer to this on
Google or the Django docs from my searches.
I want to create a function that will take a bank account as an id
On 5/14/07, James Bennett <[EMAIL PROTECTED]> wrote:
>
> On 5/14/07, Sven Herzing <[EMAIL PROTECTED]> wrote:
> > and I like to get the Products for a specific group and for a specific
> > company.
>
> Given a specific company name and a specific product group name, the
> following retrieves all
On 5/14/07, Sven Herzing <[EMAIL PROTECTED]> wrote:
> and I like to get the Products for a specific group and for a specific
> company.
Given a specific company name and a specific product group name, the
following retrieves all the products which belong to that company and
that group:
>>>
6 matches
Mail list logo