This is just a sample project/app to demonstrate shortcomings of Django's built-in form widgets for some of the more complex PostgreSQL field types.
The only example is currently an ArrayField of DateTimeRangeFields.
Tested using Django 2.2, Python 3.6.7 and PostgreSQL 9.6 on Debian 9 (with pyenv).
-
Create local PostgreSQL database using name, owner and password defined in
djangopostgresfields/settings.py
. -
pip install -r requirements.txt
-
python manage.py migrate
-
python manage.py createsuperuser
-
python manage.py runserver
-
Navigate to
/admin
, log in, and try adding a new datetimerangearray model object.
You will find the HTML form inputs and widgets provided by Django for these fields are nearly impossible to use.