Skip to content

uptick/django-user-defined-fields

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-user-defined-fields

PyPI version Code style: black

Django Used Defined Fields is a simple way to allow your users to add extra fields to your models, based on JSONField.

Installation

Standard pip install:

pip install django-user-defined-fields

Quickstart

from userdefinedfields.models import ExtraFieldsJSONField


class Example(models.Model):
  extra_fields = ExtraFieldsJSONField()

Tests

Run tests in example directory with python manage.py test library

Settings

USERDEFINEDFIELDS_INPUT_CLASSES = 'd-none'  # hide the textarea if you're using a frontend solution