Simple package for impleting models using singleton design pattern
Project description
Django Singleton Model
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.
Source Distribution
File details
Details for the file django_singleton_model-0.2.3.tar.gz
.
File metadata
- Download URL: django_singleton_model-0.2.3.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bff6a069404614dfc92bd3404855e4e70bfff63b7a7c01912d85fabb352675f1 |
|
MD5 | 9ed2ccfbefdb5e7c32852c48985c9c22 |
|
BLAKE2b-256 | 452fb0a880d369e8c2dd1b7012518c5ff51168dc94e58d7ed9ca503dbe9dd64d |