# preferences package

## Subpackages

## Submodules

## preferences.admin module

class `preferences.admin.``CotisationAdmin`(model, admin_site)

  Bases : `simple_history.admin.SimpleHistoryAdmin`

  `list_display` = ('__str__', 'amount', 'duration')
  `media`
  `ordering` = ('-duration', '-amount')

class `preferences.admin.``GeneralPreferencesAdmin`(model, admin_site)

  Bases : `simple_history.admin.SimpleHistoryAdmin`

  `list_display` = ('is_active', 'president', 'vice_president', 'treasurer', 'secretary', 'brewer', 'grocer', 'use_pinte_monitoring', 'lost_pintes_allowed', 'floating_buttons', 'automatic_logout_time')
  `media`

class `preferences.admin.``PaymentMethodAdmin`(model, admin_site)

  Bases : `simple_history.admin.SimpleHistoryAdmin`

  `list_display` = ('name', 'is_active', 'is_usable_in_cotisation', 'is_usable_in_reload', 'affect_balance')
  `list_filter` = ('is_active', 'is_usable_in_cotisation', 'is_usable_in_reload', 'affect_balance')
  `media`
  `ordering` = ('name',)
  `search_fields` = ('name',)

## preferences.apps module

class `preferences.apps.``PreferencesConfig`(app_name, app_module)

  Bases : `django.apps.config.AppConfig`

  `name` = 'preferences'

## preferences.forms module

class `preferences.forms.``CotisationForm`(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)

  Bases : `django.forms.models.ModelForm`

  Form to add and edit cotisations

  class `Meta`

    Bases : `object`

    `fields` = '__all__'
    `model`

      alias de `preferences.models.Cotisation`

  `base_fields` = {'amount': <django.forms.fields.DecimalField object>, 'duration': <django.forms.fields.IntegerField object>}
  `declared_fields` = {}
  `media`

class `preferences.forms.``GeneralPreferencesForm`(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)

  Bases : `django.forms.models.ModelForm`

  Form to edit the general preferences

  class `Meta`

    Bases : `object`

    `fields` = '__all__'
    `model`

      alias de `preferences.models.GeneralPreferences`

    `widgets` = {'active_message': <django.forms.widgets.Textarea object>, 'brewer': <django.forms.widgets.TextInput object>, 'global_message': <django.forms.widgets.Textarea object>, 'grocer': <django.forms.widgets.TextInput object>, 'home_text': <django.forms.widgets.Textarea object>, 'president': <django.forms.widgets.TextInput object>, 'secretary': <django.forms.widgets.TextInput object>, 'treasurer': <django.forms.widgets.TextInput object>, 'vice_president': <django.forms.widgets.TextInput object>}
  `base_fields` = {'active_message': <django.forms.fields.CharField object>, 'automatic_logout_time': <django.forms.fields.IntegerField object>, 'brewer': <django.forms.fields.CharField object>, 'floating_buttons': <django.forms.fields.BooleanField object>, 'global_message': <django.forms.fields.CharField object>, 'grocer': <django.forms.fields.CharField object>, 'home_text': <django.forms.fields.CharField object>, 'is_active': <django.forms.fields.BooleanField object>, 'lost_pintes_allowed': <django.forms.fields.IntegerField object>, 'menu': <django.forms.fields.FileField object>, 'president': <django.forms.fields.CharField object>, 'rules': <django.forms.fields.FileField object>, 'secretary': <django.forms.fields.CharField object>, 'statutes': <django.forms.fields.FileField object>, 'treasurer': <django.forms.fields.CharField object>, 'use_pinte_monitoring': <django.forms.fields.BooleanField object>, 'vice_president': <django.forms.fields.CharField object>}
  `declared_fields` = {}
  `media`

class `preferences.forms.``PaymentMethodForm`(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)

  Bases : `django.forms.models.ModelForm`

  Form to add and edit payment methods

  class `Meta`

    Bases : `object`

    `fields` = '__all__'
    `model`

      alias de `preferences.models.PaymentMethod`

  `base_fields` = {'affect_balance': <django.forms.fields.BooleanField object>, 'icon': <django.forms.fields.CharField object>, 'is_active': <django.forms.fields.BooleanField object>, 'is_usable_in_cotisation': <django.forms.fields.BooleanField object>, 'is_usable_in_reload': <django.forms.fields.BooleanField object>, 'name': <django.forms.fields.CharField object>}
  `declared_fields` = {}
  `media`

## preferences.models module

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

  Bases : `django.db.models.base.Model`

  Stores cotisations

  exception `DoesNotExist`

    Bases : `django.core.exceptions.ObjectDoesNotExist`

  exception `MultipleObjectsReturned`

    Bases : `django.core.exceptions.MultipleObjectsReturned`

  `amount`

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

  `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`

    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>
  `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)

  Bases : `django.db.models.base.Model`

  Stores a unique line of general preferences

  exception `DoesNotExist`

    Bases : `django.core.exceptions.ObjectDoesNotExist`

  exception `MultipleObjectsReturned`

    Bases : `django.core.exceptions.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.

  `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` = <simple_history.manager.HistoryManager object>
  `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.

  `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`

    The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:

        >>> from myapp.models import MyModel
        >>> instance = MyModel.objects.get(pk=1)
        >>> instance.file.size

    Assign a file object on assignment so you can do:

        >>> with open('/path/to/hello.world', 'r') as f:
        ...     instance.file = File(f)

  `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.

  `rules`

    The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:

        >>> from myapp.models import MyModel
        >>> instance = MyModel.objects.get(pk=1)
        >>> instance.file.size

    Assign a file object on assignment so you can do:

        >>> with open('/path/to/hello.world', 'r') as f:
        ...     instance.file = File(f)

  `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`

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

  `statutes`

    The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:

        >>> from myapp.models import MyModel
        >>> instance = MyModel.objects.get(pk=1)
        >>> instance.file.size

    Assign a file object on assignment so you can do:

        >>> with open('/path/to/hello.world', 'r') as f:
        ...     instance.file = File(f)

  `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.``HistoricalCotisation`(id, amount, duration, history_id, history_change_reason, history_date, history_user, history_type)

  Bases : `simple_history.models.HistoricalChanges`, `django.db.models.base.Model`

  exception `DoesNotExist`

    Bases : `django.core.exceptions.ObjectDoesNotExist`

  exception `MultipleObjectsReturned`

    Bases : `django.core.exceptions.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 de `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)

  Bases : `simple_history.models.HistoricalChanges`, `django.db.models.base.Model`

  exception `DoesNotExist`

    Bases : `django.core.exceptions.ObjectDoesNotExist`

  exception `MultipleObjectsReturned`

    Bases : `django.core.exceptions.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 de `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)

  Bases : `simple_history.models.HistoricalChanges`, `django.db.models.base.Model`

  exception `DoesNotExist`

    Bases : `django.core.exceptions.ObjectDoesNotExist`

  exception `MultipleObjectsReturned`

    Bases : `django.core.exceptions.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 de `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)

  Bases : `django.db.models.base.Model`

  Stores payment methods

  exception `DoesNotExist`

    Bases : `django.core.exceptions.ObjectDoesNotExist`

  exception `MultipleObjectsReturned`

    Bases : `django.core.exceptions.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.

  `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 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.

  `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.

  `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`

    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>
  `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.

## preferences.tests module

## preferences.urls module

`preferences.urls.``path`(route, view, kwargs=None, name=None, *, Pattern=<class 'django.urls.resolvers.RoutePattern'>)

## preferences.views module

`preferences.views.``get_config`(request)

  Load the config and return it in a json format

`preferences.views.``inactive`(request)

  Displays inactive view

## Module contents