skillfed

django-solo

Django Solo helps working with singletons

django-solo v2.5.1 461.0K downloads/30d#6,536 on PyPI966
License unclear CC-BY-3.0 AGING released

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-solo

uv

uv add django-solo

poetry

poetry add django-solo

Installing 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

Framework :: Django :: 4.2Framework :: Django :: 5.2Framework :: Django :: 6.0Intended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

django singleton modelsingle row database tabledjango global settings adminone-to-many parent singletondjango solo configurationsingleton admin interfacedjango single instance model
django-adminsingleton-patternconfiguration-management

More Front-Ends packages

SQLAlchemy

SQLAlchemy is a Python SQL toolkit and Object…

permissive · top 100 on PyPI

psycopg2-binary

psycopg2-binary is a PostgreSQL database…

copyleft · top 1,000 on PyPI

alembic

Alembic generates and manages database schema…

permissive · top 1,000 on PyPI

weaviate-client

A Python client library for connecting to and…

permissive · top 1,000 on PyPI

databricks-sql-connector

A Python client library that connects to…

permissive · top 1,000 on PyPI

psycopg

Psycopg 3 is a PostgreSQL database adapter for…

copyleft · top 1,000 on PyPI

django-modelcluster

django-modelcluster extends Django models to…

permissive · top 5,000 on PyPI

django-appconf

Provides a base class for Django apps to define…

permissive · top 5,000 on PyPI

drf-writable-nested

Extends Django REST Framework serializers to…

permissive · top 15,000 on PyPI

django-reverse-admin

Adds reverse inline support to Django admin for…

permissive · top 15,000 on PyPI

solus

Provides thread-safe and thread-unsafe…

permissive · top 15,000 on PyPI

sentinels

Provides singleton sentinel objects with…

permissive · top 5,000 on PyPI

pyjon.utils

Provides utility classes for Python…

permissive · top 15,000 on PyPI

wagtail-modeladmin

Adds Django model administration interfaces to…

permissive · top 15,000 on PyPI

django-admin-interface

Replaces Django's default admin interface with…

permissive · top 15,000 on PyPI

django-dynamic-preferences

Stores and retrieves application settings…

permissive · top 15,000 on PyPI