django-solo
Django Solo helps working with singletons
What it is and what it does
Django Solo is a Django package that enforces single-instance models—database tables that can only ever contain one row. It provides a SingletonModel base class and a customized admin interface that prevents users from creating multiple instances or accidentally deleting the singleton. The package is useful for storing application-wide settings, configuration objects, or parent entities in one-to-many relationships that should never have more than one instance.
The package includes optional caching to reduce database queries, template tags for retrieving the singleton from Django templates, and admin customizations that skip the object list page and prevent add/delete operations. It supports Django 4.2, 5.2, and 6.0, with runtime dependencies on django and typing-extensions.
Use it for:
- Store global or default application settings that need to be edited via Django admin instead of hardcoding in settings.py.
- Implement a parent entity in a one-to-many relationship (e.g., a single 'Home Slider' with many 'Slides') that should never have multiple instances.
- Manage site-wide configuration like maintenance mode flags or site name without creating unnecessary database rows.
- Create a single page section or team bio object that owns related sub-sections or team members.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Django Solo provides a base model class and admin interface for enforcing single-instance (singleton) database tables in Django applications, with optional caching support.
Yes, with caution on the license. The package is stable and widely used, has no known vulnerabilities, and low install friction. However, the aging maintenance status (225 days since last release) and unclear CC-BY-3.0 license classification warrant verification before production use. If your Django version and Python version are within the supported range and the license is acceptable, it is a solid choice for singleton model management.
Install
django-solo on PyPI
pip
pip install django-solouv
uv add django-solopoetry
poetry add django-soloInstalling django-solo
Before you install
Low install friction with a pure-Python wheel. Maintenance status is aging—last release was 225 days ago—but the repository remains active with 966 stars and no archived status.
License in practice
License treatment is unclear: the SPDX identifier is CC-BY-3.0, which is a Creative Commons attribution license typically used for documentation and media rather than software code. Verify with the project maintainers whether this is the intended license for the package itself.
Quickstart
pip install django-solo
# models.py
from solo.models import SingletonModel
class SiteConfiguration(SingletonModel):
site_name = models.CharField(max_length=255)
# Retrieve the singleton
config = SiteConfiguration.get_solo()
Requires Django (a runtime dependency) and Python >= 3.10.
Verify before relying
- Whether CC-BY-3.0 is the correct license for the package code or if it was misclassified.
- Current compatibility with Django 6.0 and Python 3.14 given the aging maintenance status.
- Whether the package is actively maintained despite the 225-day gap since last release.
Package facts
| License | CC-BY-3.0 (unclear) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — django, typing-extensions |
| Maintenance | aging — 225 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 460,963/month — #6,536 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_solo-2.5.1-py3-none-any.whl
Tags
More Front-Ends packages
SQLAlchemy is a Python SQL toolkit and Object…
permissive · top 100 on PyPI
psycopg2-binarypsycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
alembicAlembic generates and manages database schema…
permissive · top 1,000 on PyPI
weaviate-clientA Python client library for connecting to and…
permissive · top 1,000 on PyPI
databricks-sql-connectorA Python client library that connects to…
permissive · top 1,000 on PyPI
psycopgPsycopg 3 is a PostgreSQL database adapter for…
copyleft · top 1,000 on PyPI
django-modelclusterdjango-modelcluster extends Django models to…
permissive · top 5,000 on PyPI
django-appconfProvides a base class for Django apps to define…
permissive · top 5,000 on PyPI
drf-writable-nestedExtends Django REST Framework serializers to…
permissive · top 15,000 on PyPI
django-reverse-adminAdds reverse inline support to Django admin for…
permissive · top 15,000 on PyPI
solusProvides thread-safe and thread-unsafe…
permissive · top 15,000 on PyPI
sentinelsProvides singleton sentinel objects with…
permissive · top 5,000 on PyPI
pyjon.utilsProvides utility classes for Python…
permissive · top 15,000 on PyPI
wagtail-modeladminAdds Django model administration interfaces to…
permissive · top 15,000 on PyPI
django-admin-interfaceReplaces Django's default admin interface with…
permissive · top 15,000 on PyPI
django-dynamic-preferencesStores and retrieves application settings…
permissive · top 15,000 on PyPI