Models documentation

Gestion app models

class gestion.models.Consumption(*args, **kwargs)

Stores total consumptions.

exception DoesNotExist
exception MultipleObjectsReturned
customer

Client (django.contrib.auth.models.User).

customer_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history = <simple_history.manager.HistoryManager object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
product

A gestion.models.Product instance.

product_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

quantity

The total number of gestion.models.Consumption.product consumed by the gestion.models.Consumption.consumer.

save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

class gestion.models.ConsumptionHistory(*args, **kwargs)

Stores consumption history related to Product

exception DoesNotExist
exception MultipleObjectsReturned
amount

Price of the purchase.

coopeman

Coopeman (:class:django.contrib.auth.models.User`) who collected the money.

coopeman_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

customer

Client (django.contrib.auth.models.User).

customer_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

date

Date of the purhcase.

get_next_by_date(*, field=<django.db.models.fields.DateTimeField: date>, is_next=True, **kwargs)
get_previous_by_date(*, field=<django.db.models.fields.DateTimeField: date>, is_next=False, **kwargs)
history = <simple_history.manager.HistoryManager object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
paymentMethod

Payment Method of the product purchased.

paymentMethod_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

product

gestion.models.product purchased.

product_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

quantity

Quantity of gestion.models.ConsumptionHistory.product taken.

save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

class gestion.models.HistoricalConsumption(id, quantity, customer, product, history_id, history_change_reason, history_date, history_user, history_type)
exception DoesNotExist
exception MultipleObjectsReturned
customer

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

customer_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_object
history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

instance
instance_type

alias of Consumption

next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
prev_record

Get the previous history record for the instance. None if first.

product

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

product_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

quantity

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

revert_url()

URL for this change in the default admin site.

class gestion.models.HistoricalConsumptionHistory(id, quantity, date, amount, customer, paymentMethod, product, coopeman, history_id, history_change_reason, history_date, history_user, history_type)
exception DoesNotExist
exception MultipleObjectsReturned
amount

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

coopeman

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

coopeman_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

customer

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

customer_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_date(*, field=<django.db.models.fields.DateTimeField: date>, is_next=True, **kwargs)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_previous_by_date(*, field=<django.db.models.fields.DateTimeField: date>, is_next=False, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_object
history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

instance
instance_type

alias of ConsumptionHistory

next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
paymentMethod

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

paymentMethod_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

prev_record

Get the previous history record for the instance. None if first.

product

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

product_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

quantity

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

revert_url()

URL for this change in the default admin site.

class gestion.models.HistoricalKeg(id, name, stockHold, barcode, amount, capacity, is_active, pinte, demi, galopin, history_id, history_change_reason, history_date, history_user, history_type)
exception DoesNotExist
exception MultipleObjectsReturned
amount

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

barcode

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

capacity

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

demi

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

demi_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

galopin

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

galopin_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_object
history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

instance
instance_type

alias of Keg

is_active

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
pinte

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

pinte_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

prev_record

Get the previous history record for the instance. None if first.

revert_url()

URL for this change in the default admin site.

stockHold

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class gestion.models.HistoricalKegHistory(id, openingDate, quantitySold, amountSold, closingDate, isCurrentKegHistory, keg, history_id, history_change_reason, history_date, history_user, history_type)
exception DoesNotExist
exception MultipleObjectsReturned
amountSold

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

closingDate

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_next_by_openingDate(*, field=<django.db.models.fields.DateTimeField: openingDate>, is_next=True, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
get_previous_by_openingDate(*, field=<django.db.models.fields.DateTimeField: openingDate>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_object
history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

instance
instance_type

alias of KegHistory

isCurrentKegHistory

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

keg

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

keg_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
openingDate

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

prev_record

Get the previous history record for the instance. None if first.

quantitySold

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

revert_url()

URL for this change in the default admin site.

class gestion.models.HistoricalMenu(id, name, amount, barcode, is_active, history_id, history_change_reason, history_date, history_user, history_type)
exception DoesNotExist
exception MultipleObjectsReturned
amount

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

barcode

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_object
history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

instance
instance_type

alias of Menu

is_active

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
prev_record

Get the previous history record for the instance. None if first.

revert_url()

URL for this change in the default admin site.

class gestion.models.HistoricalMenuHistory(id, quantity, date, amount, customer, paymentMethod, menu, coopeman, history_id, history_change_reason, history_date, history_user, history_type)
exception DoesNotExist
exception MultipleObjectsReturned
amount

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

coopeman

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

coopeman_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

customer

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

customer_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_date(*, field=<django.db.models.fields.DateTimeField: date>, is_next=True, **kwargs)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_previous_by_date(*, field=<django.db.models.fields.DateTimeField: date>, is_next=False, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_object
history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

instance
instance_type

alias of MenuHistory

menu

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

menu_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
paymentMethod

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

paymentMethod_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

prev_record

Get the previous history record for the instance. None if first.

quantity

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

revert_url()

URL for this change in the default admin site.

class gestion.models.HistoricalPinte(id, last_update_date, current_owner, previous_owner, history_id, history_change_reason, history_date, history_user, history_type)
exception DoesNotExist
exception MultipleObjectsReturned
current_owner

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

current_owner_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_next_by_last_update_date(*, field=<django.db.models.fields.DateTimeField: last_update_date>, is_next=True, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
get_previous_by_last_update_date(*, field=<django.db.models.fields.DateTimeField: last_update_date>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_object
history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

instance
instance_type

alias of Pinte

last_update_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
prev_record

Get the previous history record for the instance. None if first.

previous_owner

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

previous_owner_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

revert_url()

URL for this change in the default admin site.

class gestion.models.HistoricalProduct(id, name, amount, stockHold, stockBar, barcode, category, needQuantityButton, is_active, volume, deg, adherentRequired, showingMultiplier, history_id, history_change_reason, history_date, history_user, history_type)
exception DoesNotExist
exception MultipleObjectsReturned
adherentRequired

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

amount

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

barcode

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

category

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

deg

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_category_display(*, field=<django.db.models.fields.CharField: category>)
get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_object
history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

instance
instance_type

alias of Product

is_active

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

needQuantityButton

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
prev_record

Get the previous history record for the instance. None if first.

revert_url()

URL for this change in the default admin site.

showingMultiplier

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

stockBar

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

stockHold

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

volume

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class gestion.models.HistoricalRefund(id, date, amount, customer, coopeman, history_id, history_change_reason, history_date, history_user, history_type)
exception DoesNotExist
exception MultipleObjectsReturned
amount

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

coopeman

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

coopeman_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

customer

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

customer_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_date(*, field=<django.db.models.fields.DateTimeField: date>, is_next=True, **kwargs)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_previous_by_date(*, field=<django.db.models.fields.DateTimeField: date>, is_next=False, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_object
history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

instance
instance_type

alias of Refund

next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
prev_record

Get the previous history record for the instance. None if first.

revert_url()

URL for this change in the default admin site.

class gestion.models.HistoricalReload(id, amount, date, customer, PaymentMethod, coopeman, history_id, history_change_reason, history_date, history_user, history_type)
exception DoesNotExist
exception MultipleObjectsReturned
PaymentMethod

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

PaymentMethod_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

amount

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

coopeman

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

coopeman_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

customer

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

customer_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_date(*, field=<django.db.models.fields.DateTimeField: date>, is_next=True, **kwargs)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_previous_by_date(*, field=<django.db.models.fields.DateTimeField: date>, is_next=False, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_object
history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

instance
instance_type

alias of Reload

next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
prev_record

Get the previous history record for the instance. None if first.

revert_url()

URL for this change in the default admin site.

class gestion.models.Keg(*args, **kwargs)

Stores a keg.

exception DoesNotExist
exception MultipleObjectsReturned
amount

The price of the keg.

barcode

The barcode of the keg.

capacity

The capacity, in liters, of the keg.

demi

The related Product for demi.

demi_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

galopin

The related Product for galopin.

galopin_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history = <simple_history.manager.HistoryManager object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_active

If True, will be displayed on manage() view

keghistory_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

name

The name of the keg.

objects = <django.db.models.manager.Manager object>
pinte

The related Product for pint.

pinte_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

stockHold

The number of this keg in the hold.

class gestion.models.KegHistory(*args, **kwargs)

Stores a keg history, related to Keg.

exception DoesNotExist
exception MultipleObjectsReturned
amountSold

The quantity, in euros, sold.

closingDate

The date when the keg was closed

get_next_by_openingDate(*, field=<django.db.models.fields.DateTimeField: openingDate>, is_next=True, **kwargs)
get_previous_by_openingDate(*, field=<django.db.models.fields.DateTimeField: openingDate>, is_next=False, **kwargs)
history = <simple_history.manager.HistoryManager object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

isCurrentKegHistory

If True, it corresponds to the current Keg history of Keg instance.

keg

The Keg instance.

keg_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
openingDate

The date when the keg was opened.

quantitySold

The quantity, in liters, sold.

save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

class gestion.models.Menu(*args, **kwargs)

Stores menus.

exception DoesNotExist
exception MultipleObjectsReturned
adherent_required

Test if the menu contains a restricted Product

amount

Price of the menu.

articles

Stores Products contained in the menu

barcode

Barcode of the menu.

history = <simple_history.manager.HistoryManager object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_active

If True, the menu will be displayed on the gestion.views.manage() view

menuhistory_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

name

Name of the menu.

objects = <django.db.models.manager.Manager object>
save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

class gestion.models.MenuHistory(*args, **kwargs)

Stores MenuHistory related to Menu.

exception DoesNotExist
exception MultipleObjectsReturned
amount

Price of the purchase.

coopeman

Coopeman (:class:django.contrib.auth.models.User`) who collected the money.

coopeman_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

customer

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

customer_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

date

Date of the purhcase.

get_next_by_date(*, field=<django.db.models.fields.DateTimeField: date>, is_next=True, **kwargs)
get_previous_by_date(*, field=<django.db.models.fields.DateTimeField: date>, is_next=False, **kwargs)
history = <simple_history.manager.HistoryManager object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

menu

gestion.models.Menu purchased.

menu_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
paymentMethod

Payment Method of the Menu purchased.

paymentMethod_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

quantity

Client (django.contrib.auth.models.User).

save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

class gestion.models.Pinte(*args, **kwargs)

Stores a physical pinte

exception DoesNotExist
exception MultipleObjectsReturned
current_owner

The current owner (django.contrib.auth.models.User).

current_owner_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_last_update_date(*, field=<django.db.models.fields.DateTimeField: last_update_date>, is_next=True, **kwargs)
get_previous_by_last_update_date(*, field=<django.db.models.fields.DateTimeField: last_update_date>, is_next=False, **kwargs)
history = <simple_history.manager.HistoryManager object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

last_update_date

The last update date

objects = <django.db.models.manager.Manager object>
previous_owner

The previous owner (django.contrib.auth.models.User).

previous_owner_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

class gestion.models.Product(*args, **kwargs)

Stores a product.

BOTTLE = 'BT'
D_PRESSION = 'DP'
exception DoesNotExist
FOOD = 'FO'
G_PRESSION = 'GP'
exception MultipleObjectsReturned
PANINI = 'PA'
P_PRESSION = 'PP'
SOFT = 'SO'
TYPEINPUT_CHOICES_CATEGORIE = (('PP', 'Pinte Pression'), ('DP', 'Demi Pression'), ('GP', 'Galopin pression'), ('BT', 'Bouteille'), ('SO', 'Soft'), ('FO', 'En-cas'), ('PA', 'Ingredients panini'))
adherentRequired

If True, only adherents will be able to buy this product

amount

The price of the product.

barcode

The barcode of the product.

category

The category of the product

consumption_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

consumptionhistory_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

deg

Degree of alcohol, if relevant

futd

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

futg

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

futp

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

get_category_display(*, field=<django.db.models.fields.CharField: category>)
history = <simple_history.manager.HistoryManager object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_active

If True, will be displayed on the gestion.views.manage() view.

menu_set

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

name

The name of the product.

needQuantityButton

If True, a javascript quantity button will be displayed

objects = <django.db.models.manager.Manager object>
ranking

Get the first 25 users with user_ranking()

save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

showingMultiplier

On the graphs on users.views.profile() view, the number of total consumptions is divised by the showingMultiplier

stockBar

Number of product at the bar.

stockHold

Number of product in the hold.

user_ranking(pk)

Return the user ranking for the product

volume

The volume, if relevant, of the product

class gestion.models.Refund(*args, **kwargs)

Stores refunds.

exception DoesNotExist
exception MultipleObjectsReturned
amount

Amount of the refund.

coopeman

Coopeman (django.contrib.auth.models.User) who realized the refund.

coopeman_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

customer

Client (django.contrib.auth.models.User).

customer_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

date

Date of the refund

get_next_by_date(*, field=<django.db.models.fields.DateTimeField: date>, is_next=True, **kwargs)
get_previous_by_date(*, field=<django.db.models.fields.DateTimeField: date>, is_next=False, **kwargs)
history = <simple_history.manager.HistoryManager object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

class gestion.models.Reload(*args, **kwargs)

Stores reloads.

exception DoesNotExist
exception MultipleObjectsReturned
PaymentMethod

Payment Method of the reload.

PaymentMethod_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

amount

Amount of the reload.

coopeman

Coopeman (django.contrib.auth.models.User) who collected the reload.

coopeman_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

customer

Client (django.contrib.auth.models.User).

customer_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

date

Date of the reload.

get_next_by_date(*, field=<django.db.models.fields.DateTimeField: date>, is_next=True, **kwargs)
get_previous_by_date(*, field=<django.db.models.fields.DateTimeField: date>, is_next=False, **kwargs)
history = <simple_history.manager.HistoryManager object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

gestion.models.isDemi(id)
gestion.models.isGalopin(id)
gestion.models.isPinte(id)

Users app models

class users.models.CotisationHistory(*args, **kwargs)

Stores cotisation histories, related to preferences.models.Cotisation.

exception DoesNotExist
exception MultipleObjectsReturned
amount

Price, in euros, of the cotisation.

coopeman

User (django.contrib.auth.models.User) who registered the cotisation.

coopeman_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

cotisation

Cotisation related.

cotisation_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

duration

Duration, in days, of the cotisation.

endDate

End date of the cotisation.

get_next_by_endDate(*, field=<django.db.models.fields.DateTimeField: endDate>, is_next=True, **kwargs)
get_next_by_paymentDate(*, field=<django.db.models.fields.DateTimeField: paymentDate>, is_next=True, **kwargs)
get_previous_by_endDate(*, field=<django.db.models.fields.DateTimeField: endDate>, is_next=False, **kwargs)
get_previous_by_paymentDate(*, field=<django.db.models.fields.DateTimeField: paymentDate>, is_next=False, **kwargs)
history = <simple_history.manager.HistoryManager object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
paymentDate

Date of the payment.

paymentMethod

Payment method used.

paymentMethod_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

user

Client (django.contrib.auth.models.User).

user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class users.models.HistoricalCotisationHistory(id, amount, duration, paymentDate, endDate, user, paymentMethod, cotisation, coopeman, history_id, history_change_reason, history_date, history_user, history_type)
exception DoesNotExist
exception MultipleObjectsReturned
amount

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

coopeman

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

coopeman_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

cotisation

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

cotisation_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

duration

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

endDate

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_endDate(*, field=<django.db.models.fields.DateTimeField: endDate>, is_next=True, **kwargs)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_next_by_paymentDate(*, field=<django.db.models.fields.DateTimeField: paymentDate>, is_next=True, **kwargs)
get_previous_by_endDate(*, field=<django.db.models.fields.DateTimeField: endDate>, is_next=False, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
get_previous_by_paymentDate(*, field=<django.db.models.fields.DateTimeField: paymentDate>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_object
history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

instance
instance_type

alias of CotisationHistory

next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
paymentDate

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

paymentMethod

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

paymentMethod_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

prev_record

Get the previous history record for the instance. None if first.

revert_url()

URL for this change in the default admin site.

user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class users.models.HistoricalProfile(id, credit, debit, cotisationEnd, user, school, history_id, history_change_reason, history_date, history_user, history_type)
exception DoesNotExist
exception MultipleObjectsReturned
cotisationEnd

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

credit

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

debit

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_object
history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

instance
instance_type

alias of Profile

next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
prev_record

Get the previous history record for the instance. None if first.

revert_url()

URL for this change in the default admin site.

school

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

school_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class users.models.HistoricalSchool(id, name, history_id, history_change_reason, history_date, history_user, history_type)
exception DoesNotExist
exception MultipleObjectsReturned
get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_object
history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

instance
instance_type

alias of School

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
prev_record

Get the previous history record for the instance. None if first.

revert_url()

URL for this change in the default admin site.

class users.models.HistoricalWhiteListHistory(id, paymentDate, endDate, duration, user, coopeman, history_id, history_change_reason, history_date, history_user, history_type)
exception DoesNotExist
exception MultipleObjectsReturned
coopeman

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

coopeman_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

duration

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

endDate

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_endDate(*, field=<django.db.models.fields.DateTimeField: endDate>, is_next=True, **kwargs)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_next_by_paymentDate(*, field=<django.db.models.fields.DateTimeField: paymentDate>, is_next=True, **kwargs)
get_previous_by_endDate(*, field=<django.db.models.fields.DateTimeField: endDate>, is_next=False, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
get_previous_by_paymentDate(*, field=<django.db.models.fields.DateTimeField: paymentDate>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_object
history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

instance
instance_type

alias of WhiteListHistory

next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
paymentDate

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

prev_record

Get the previous history record for the instance. None if first.

revert_url()

URL for this change in the default admin site.

user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class users.models.Profile(*args, **kwargs)

Stores user profile.

exception DoesNotExist
exception MultipleObjectsReturned
alcohol

Computes ingerated alcohol.

balance

Computes client balance (gestion.models.Profile.credit - gestion.models.Profile.debit).

cotisationEnd

Date of end of cotisation for the client

credit

Amount of money, in euros, put on the account

debit

Amount of money, in euros, spent form the account

history = <simple_history.manager.HistoryManager object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_adherent

Test if a client is adherent.

nb_pintes

Return the number of Pinte(s) currently owned.

objects = <django.db.models.manager.Manager object>
positiveBalance()

Test if the client balance is positive or null.

rank

Computes the rank (by gestion.models.Profile.debit) of the client.

save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

school

School of the client

school_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

user

Client (django.contrib.auth.models.User).

user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class users.models.School(*args, **kwargs)

Stores school.

exception DoesNotExist
exception MultipleObjectsReturned
history = <simple_history.manager.HistoryManager object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

name

The name of the school

objects = <django.db.models.manager.Manager object>
profile_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

class users.models.WhiteListHistory(*args, **kwargs)

Stores whitelist history.

exception DoesNotExist
exception MultipleObjectsReturned
coopeman

User (django.contrib.auth.models.User) who registered the cotisation.

coopeman_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

duration

Duration, in days, of the whitelist

endDate

End date of the whitelist.

get_next_by_endDate(*, field=<django.db.models.fields.DateTimeField: endDate>, is_next=True, **kwargs)
get_next_by_paymentDate(*, field=<django.db.models.fields.DateTimeField: paymentDate>, is_next=True, **kwargs)
get_previous_by_endDate(*, field=<django.db.models.fields.DateTimeField: endDate>, is_next=False, **kwargs)
get_previous_by_paymentDate(*, field=<django.db.models.fields.DateTimeField: paymentDate>, is_next=False, **kwargs)
history = <simple_history.manager.HistoryManager object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
paymentDate

Date of the beginning of the whitelist.

save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

user

Client (django.contrib.auth.models.User).

user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

users.models.create_user_profile(sender, instance, created, **kwargs)

Create profile when user (django.contrib.auth.models.User) is created.

users.models.save_user_profile(sender, instance, **kwargs)

Save profile when user (django.contrib.auth.models.User) is saved.

users.models.str_user(self)

Rewrite str method for user (django.contrib.auth.models.User).

Preferences app models

class preferences.models.Cotisation(*args, **kwargs)

Stores cotisations.

exception DoesNotExist
exception MultipleObjectsReturned
amount

Price of the cotisation.

cotisationhistory_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

duration

Duration (in days) of the cotisation

history = <simple_history.manager.HistoryManager object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

class preferences.models.GeneralPreferences(*args, **kwargs)

Stores a unique line of general preferences

exception DoesNotExist
exception MultipleObjectsReturned
active_message

Message displayed on the inactive()

automatic_logout_time

Duration after which the user is automatically disconnected if inactive

brewer

The name of the brewer

floating_buttons

If True, displays floating paymentButtons on the manage() view.

global_message

List of messages, separated by a carriage return. One will be chosen randomly at each request on displayed in the header

grocer

The name of the grocer

history = <simple_history.manager.HistoryManager object>
home_text

Text display on the home page

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_active

If True, the site will be accessible. If False, all the requests are redirect to inactive().

lost_pintes_allowed

If > 0, a user will be blocked if he has losted more pints than the value

menu

The file of the menu

objects = <django.db.models.manager.Manager object>
president

The name of the president

rules

The file of the internal rules

save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

secretary

The name of the secretary

statutes

The file of the statutes

treasurer

The name of the treasurer

use_pinte_monitoring

If True, alert will be displayed to allocate pints during order

vice_president

The name of the vice-president

class preferences.models.HistoricalCotisation(id, amount, duration, history_id, history_change_reason, history_date, history_user, history_type)
exception DoesNotExist
exception MultipleObjectsReturned
amount

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

duration

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_object
history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

instance
instance_type

alias of Cotisation

next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
prev_record

Get the previous history record for the instance. None if first.

revert_url()

URL for this change in the default admin site.

class preferences.models.HistoricalGeneralPreferences(id, is_active, active_message, global_message, president, vice_president, treasurer, secretary, brewer, grocer, use_pinte_monitoring, lost_pintes_allowed, floating_buttons, home_text, automatic_logout_time, statutes, rules, menu, history_id, history_change_reason, history_date, history_user, history_type)
exception DoesNotExist
exception MultipleObjectsReturned
active_message

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

automatic_logout_time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

brewer

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

floating_buttons

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
global_message

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

grocer

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_object
history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

home_text

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

instance
instance_type

alias of GeneralPreferences

is_active

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

lost_pintes_allowed

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

menu

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
president

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

prev_record

Get the previous history record for the instance. None if first.

revert_url()

URL for this change in the default admin site.

rules

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

secretary

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

statutes

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

treasurer

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

use_pinte_monitoring

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

vice_president

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class preferences.models.HistoricalPaymentMethod(id, name, is_active, is_usable_in_cotisation, is_usable_in_reload, affect_balance, icon, history_id, history_change_reason, history_date, history_user, history_type)
exception DoesNotExist
exception MultipleObjectsReturned
affect_balance

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_object
history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

icon

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

instance
instance_type

alias of PaymentMethod

is_active

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_usable_in_cotisation

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_usable_in_reload

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
prev_record

Get the previous history record for the instance. None if first.

revert_url()

URL for this change in the default admin site.

class preferences.models.PaymentMethod(*args, **kwargs)

Stores payment methods.

exception DoesNotExist
exception MultipleObjectsReturned
affect_balance

If true, the PaymentMethod will decrease the user’s balance when used.

consumptionhistory_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

cotisationhistory_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

history = <simple_history.manager.HistoryManager object>
icon

A font awesome icon (without the fa)

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_active

If False, the PaymentMethod can’t be use anywhere.

is_usable_in_cotisation

If true, the PaymentMethod can be used to pay cotisation.

is_usable_in_reload

If true, the PaymentMethod can be used to reload an user account.

menuhistory_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

name

The name of the PaymentMethod.

objects = <django.db.models.manager.Manager object>
reload_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.