Model classes

In order to be able to associate every user who has configured the latch with the Latch service and check its status (on or off), django-latch has to store the parameter that uniquely identify a user against the Latch service: an account id.

Following the Django’s guidelines for extending the User model the account id is stored in a separate table from the User one, along with a foreign key pointing to the respective user.

class django_latch.models.LatchUserConfig(*args, **kwargs)[source]

Store the necessary configuration to associate a user to the Latch service.

account_id

A 64-long CharField that identifies the user in the Latch service.

user

A OneToOneField that identifies the user who has configured the Latch service.

Parameters:

Relationship fields:

Parameters:

user (OneToOneField to User) – User (related name: latch_config)