Manager

class firm_info.managers.SingletonManager(*args, **kwargs)[source]

A manager to ensure that only one instance of the model exists.

This manager overrides the create method to enforce a singleton pattern on the associated model. If an instance of the model already exists, attempting to create another instance will raise a ValueError.

create(**kwargs)[source]

Creates a new instance of the model if none exists. Raises ValueError if an instance already exists.