Installation¶
Get up and running with django-hstore-project in minutes.
Requirements¶
Python 3.10+ Django 5.0+ PostgreSQL 14+ Modern browsers (Chrome 112+, Firefox 117+, Safari 16.5+)
Install django-hstore-field¶
pip install django-hstore-field
Collecting django-hstore-field
Collecting django-hstore-widget
Installing collected packages...
Successfully installed django-hstore-field django-hstore-widget
uv pip install django-hstore-field
Collecting django-hstore-field
Collecting django-hstore-widget
Installing collected packages...
Successfully installed django-hstore-field django-hstore-widget
poetry add django-hstore-field
Creating virtualenv: django-hstore-project
Package django-hstore-field added.
Package django-hstore-widget added (dependency).
pdm add django-hstore-field
Adding packages to workspace: django-hstore-field
Package django-hstore-widget added (dependency).
All packages are installed.
echo "django-hstore-field" >> requirements.in
pip-compile requirements.in
#
# This file is autogenerated by pip-compile
#
django-hstore-field==1.0.0
django-hstore-widget==1.0.0
pip-sync requirements.txt
Configure¶
Add both packages to your INSTALLED_APPS:
# settings.py
INSTALLED_APPS = [
...,
'django_hstore_widget',
'django_hstore_field',
...,
]
Run Migrations¶
python manage.py migrate
Operations to perform:
Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
All migrations completed.
This enables the PostgreSQL hstore extension automatically.
Next¶
Head over to the Quick Start to use HStore fields in your models.