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

Installing

Install the package

$ pip3 install django-singleton-model

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

Using

Import the SingletonModel class and inherit from it

from singleton_model import SingletonModel

class MySingleModel(SingletonModel):
    pass

Running tests

Go into example folder

$ cd example

and run them

$ ./manage.py test

Troubleshooting

Check the example folder if you have any doubts. Or you can create an issue.

Project details


Download files

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

Files for django-singleton-model, version 0.2.3
Filename, size File type Python version Upload date Hashes
Filename, size django_singleton_model-0.2.3.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page