Skip to main content

Simple package for impleting models using singleton design pattern

Project description

Django Singleton Model

Build Status

Singleton design-pattern implementation for using with django models and works with more recent versions of django


Install the package

$ pip3 install django-singleton-model

now you can import the SingletonModel class and inherit from it

from singleton_models import SingletonModel

class MySingleModel(SingletonModel):

and that’s it. Don’t add it to INSTALLED_APPS.

Running tests

Go into example folder

$ cd example

and run them

$ ./ test


Check the example folder if you have any doubts. Or you can created an issue it doesn’t work anyway.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_singleton_model-0.2.1.tar.gz (2.8 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page