Simple package for impleting models using singleton design pattern
Project description
Singleton design-pattern implementation for using with django models and works with more recent versions of django
Using
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):
pass
and that’s it. Don’t add it to INSTALLED_APPS.
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 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
Close
Hashes for django_singleton_model-0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a20839684c565189da2305f21bdb5b685bcacd86f9f65fb559e9cbf2c1a52d93 |
|
MD5 | d1f90f7a87f7a4fa99dadf59d92247b1 |
|
BLAKE2b-256 | 28cee657097e33e1f02302f26880e5f3d7e78628bb97964f861c404e03b4e3c3 |