Skip to main content

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

  1. Install django pickled model:

    pip install django-pickled-model
  2. Add “pickles” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'pickles',
    ]
  1. Include the pickles URLconf in your project urls.py like this:

    path('pickles/', include('pickles.api.urls')),
  2. Run python manage.py migrate to create the polls models.

  3. 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).

  4. 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

django_pickled_model-1.1.3.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_pickled_model-1.1.3-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file django_pickled_model-1.1.3.tar.gz.

File metadata

  • Download URL: django_pickled_model-1.1.3.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for django_pickled_model-1.1.3.tar.gz
Algorithm Hash digest
SHA256 d1db5e8ce72c37b3e000c090ee6cc16c3d46e3c67becc9f2c6eb2f88bc632a24
MD5 00ea2e0a5a14f409d7b34bffe7724b89
BLAKE2b-256 b8996b7a2d84ccfacb8e3d0755a8703f9b01d351950b380b71cea49540cb1796

See more details on using hashes here.

File details

Details for the file django_pickled_model-1.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_pickled_model-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fa3f8193c06a834e687a0899a08245e52e8d5868464ad3a73bff73acb2780627
MD5 9c65f8e6c1a1b794dbda2340e3472248
BLAKE2b-256 d6f29de7ed22548751621d3751b56bbc446878433c52865e9db49e147a029d65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page