Giter VIP home page Giter VIP logo

django-flexible's Introduction

django-flexible

Flexible model package for django. Tested to work with django 2.2.11.

Provides support for the following field types:

  • Text
  • Integer
  • Decimal
  • Boolean
  • Date
  • Duration
  • Email

Provides support for:

  • Choices
  • Required
  • Evaluated fields (field value is determined by other field values)
  • Testing conditions against individual field values and whole model instances
  • Executing actions based on field values, easily extended

Requires PostgreSQL as the database backend (will drop requirement eventually)

Installation

pip install django-flexible

Add the following to your INSTALLED_APPS

'polymorphic',
'crispy_forms',
'flexible'

Examples

Creating a model

from flexible.models import Model, TextField


# create a blank model
model = Model(name='Example model', ready=True)
model.save()

# add a text field to the model
text_field = TextField.objects.create(model=model, index=0, verbose_name='TestRequiredTextField', required=True)

Creating a model instance

model_instance = model.create_instance()

text_field.create_instance(model_instance, 'Test value')

django-flexible's People

Contributors

cmberryau avatar dependabot[bot] avatar

Stargazers

 avatar Anh Pham avatar

Watchers

James Cloos avatar  avatar Anh Pham avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.