skillfed

django-autoslug

An automated slug field for Django.

django-autoslug v1.9.9 408.6K downloads/30d#6,879 on PyPI305
Copyleft license GNU Lesser General Public License (LGPL), Version 3 AGING released

What it is and what it does

django-autoslug is a reusable Django library that adds an AutoSlugField to your models—a specialized CharField that automatically generates URL-safe slugs from other model fields. Instead of manually creating and maintaining slug values, you configure the field to populate itself from a source field (like a title), and it handles the conversion to lowercase, hyphenated text automatically. The field enforces uniqueness constraints, optionally scoped to other fields, so you can have unique slugs per author or per publication date if needed.

The main value is reducing boilerplate in Django projects: you avoid writing custom save() methods or signals to generate slugs, and you get built-in support for custom slugification functions to handle non-ASCII characters and internationalization. The field is highly configurable—you can supply a lambda to derive the slug from multiple fields, define which other fields must be considered when checking uniqueness, and plug in your own slugify function. It has no external runtime dependencies beyond Django itself.

Use it for:

  • Auto-generate URL slugs for blog posts, articles, or product pages from their titles without manual slug management.
  • Enforce unique slugs per author or category by scoping uniqueness constraints to related fields.
  • Handle international content with custom slugify functions that transliterate non-ASCII characters appropriately.
  • Reduce boilerplate in Django models by replacing manual slug-generation logic with a declarative field.
  • Maintain slug consistency across model updates—the field regenerates automatically when the source field changes.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a Django model field that automatically generates and maintains URL-friendly slugs from other fields, with built-in uniqueness enforcement and support for custom slugification logic.

Yes, with conditions. django-autoslug is stable, well-established (since 2009), and solves a common Django problem cleanly with zero external dependencies. However, the last release was April 2023 and maintenance is aging; verify compatibility with your current Django version before adopting. No known security vulnerabilities. The LGPL license is permissive for most use cases but requires derivative works to remain open-source.

Install

django-autoslug on PyPI

pip

pip install django-autoslug

uv

uv add django-autoslug

poetry

poetry add django-autoslug

Installing django-autoslug

Before you install

Low friction install with no runtime dependencies. Last release was over a year ago (April 2023) and the repository shows aging maintenance status, though it remains active and archived status is false.

License in practice

Licensed under GNU Lesser General Public License v3 (copyleft). You may use and modify the package freely, but derivative works must also be distributed under LGPL or a compatible license.

Quickstart

pip install django-autoslug

from django.db.models import CharField, Model
from autoslug import AutoSlugField

class Article(Model):
    title = CharField(max_length=200)
    slug = AutoSlugField(populate_from='title')

Requires Django 3.2 or higher and Python 3.7 or higher.

Verify before relying

  • Whether the aging maintenance status (last release April 2023) affects compatibility with current Django versions beyond 3.2.
  • Real-world performance characteristics when handling large numbers of unique slug collisions.

Package facts

License GNU Lesser General Public License (LGPL), Version 3 (copyleft)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance aging — 1,229 days since the last release
Last repo commit
First released
Downloads 408,571/month — #6,879 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: django_autoslug-1.9.9-py2.py3-none-any.whl

Keywords: django, field, slug, auto, unique, transliteration, i18n

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 3.2Intended Audience :: DevelopersLicense :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)Programming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python ModulesTopic :: Text Processing :: General

Tags

django slug field auto-generatedjango url-friendly slugdjango unique slug fielddjango autoslugdjango slug from fielddjango i18n slugdjango slug uniqueness
django-fieldurl-slugi18n

More Python Modules packages