pay.models.payable

Module Contents

Classes

PayableBase

Payable

Links the parent model with 0 to n Payment

PayableManyTimes

Same as Payable, but using a list of payments instead of

Functions

hash_primary_key(→ str)

pay.models.payable.hash_primary_key(text: str) str[source]
class pay.models.payable.PayableBase[source]
property payable_reference: str[source]

A string which identifies this payable in payment lists. Do not join any values here as it can lead to an explosion of executed queries!

By default we use the table name plus a hash derived from the primary key values of the table. This ensures that we do not accidentally leak secrets.

In practice, this reference should be customised for each payable.

class pay.models.payable.Payable[source]

Bases: PayableBase

Links the parent model with 0 to n Payment records through an automatically generated association table.

payment[source]
class pay.models.payable.PayableManyTimes[source]

Bases: PayableBase

Same as Payable, but using a list of payments instead of a single one (proper many-to-many payments).

payments[source]