Django pickled model provides you a model with dynamic data types.
Project description
Django pickled model provides you a model with dynamic data types. a field can store any value in any type.
You can store Integer, Boolean, String and any other data type just using a single field. so there is no need to define extra fields and make your model dirty.
Quick start
Install django pickled model:
pip install django-pickled-model
Add “pickles” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'pickles', ]
Include the pickles URLconf in your project urls.py like this:
path('pickles/', include('pickles.api.urls')),
Run python manage.py migrate to create the polls models.
Start the development server and visit http://127.0.0.1:8000/admin/ to create dynamic-type data (you’ll need the Admin app enabled).
You can get a list of your pickles by calling the API URL.
How it works
Admin panel is where you can create your objects. currently supported data types are:
STRING
INTEGER
FLOAT
LIST
DICTIONARY
BOOLEAN
Now let’s describe each field in admin creation form.
name
the key name for your value. considering the schema {name: value}, the name you enter will be replaced.
value
value is the field that you can enter any data based on the value data type that you choose.
for STR the value will be like: “my string value”
for INTEGER the value will be like: 1
for FLOAT the value will be like: 1.5
for LIST the value will be like: [1,2,3]
for DICTIONARY the value will be like: {“key”: “value”}
for BOOLEAN the value will be like: True
value data type
this is the field that you must choose your value data type.
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
Built Distribution
Hashes for django-pickled-model-1.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9445488d4955baeace9cb999726b16495ca226729fdd7abc2c23162e8ca14d7b |
|
MD5 | 85f8944a180f430f7a9e1b34bd9e8f2b |
|
BLAKE2b-256 | 35a4a5d90879828e622c972bb0bec29eee5aaa1e7f32a15cc6c252f56e19a48c |
Hashes for django_pickled_model-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3eeffdfecc066346683e5008e894c2b9c91034b3f7c16c68a5b7a48c4dbfeda4 |
|
MD5 | e02fac91acedbec1b8f5c7dd594f2e69 |
|
BLAKE2b-256 | 01cd8f7e6e37ea4ad9d57fa140ec5cfad8e7eab5231219f5a17cb23eb7094a4d |