django-autoslug 1.8.0

An automated slug field for Django.

Django-autoslug is a reusable Django library that provides an improved slug field which can automatically:

  1. populate itself from another field,
  2. preserve uniqueness of the value and
  3. use custom slugify() functions for better i18n.

Requirements

Obviously, a more or less recent version of Django.

The following versions of Python are officially supported: 2.7, 3.2, 3.4, PyPy.

It may be possible to successfully use django-autoslug in other environments but they are not tested.

Examples

A simple example:

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

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

More complex example:

from django.db.models import CharField, DateField, ForeignKey, Model
from django.contrib.auth.models import User
from autoslug import AutoSlugField

class Article(Model):
    title = CharField(max_length=200)
    pub_date = DateField(auto_now_add=True)
    author = ForeignKey(User)
    slug = AutoSlugField(populate_from=lambda instance: instance.title,
                         unique_with=['author__name', 'pub_date__month'],
                         slugify=lambda value: value.replace(' ','-'))

Documentation

See complete HTML documentation for details. Sometimes it may get slightly outdated. You can always have the latest snapsnot by building it from the source (using Sphinx).

Community

This application was initially created by Andy Mikhailenko and then improved by other developers. They are listed in AUTHORS.

Please feel free to file issues and/or submit patches.

See CONTRIBUTING for hints related to the preferred workflow.

Licensing

Django-autoslug is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

Django-autoslug is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program; see the file COPYING.LESSER. If not, see GNU licenses.

GNU Lesser General Public License (LGPL), Version 3

Author

Andy Mikhailenko

Pip

django-autoslug==1.8.0

Classifiers

  • Development Status :: 5 - Production/Stable
  • Environment :: Web Environment
  • Framework :: Django
  • Intended Audience :: Developers
  • Programming Language :: Python
  • Topic :: Software Development :: Libraries :: Python Modules
  • License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
  • Topic :: Text Processing :: General
File Type Python Version Uploaded On Downloads
django-autoslug-1.8.0.tar.gz Source May 17, 2015 37,556
Version Release Date
1.8.0 May 17, 2015
1.7.2 Jan. 6, 2014
1.7.1 July 5, 2013
1.7.0 July 1, 2013
1.6.1 Sept. 29, 2012
1.6.0 Sept. 17, 2012
1.5.0 Dec. 18, 2011
1.4.1 March 15, 2010
1.4.0 March 14, 2010
1.3.9 Feb. 25, 2010
1.3.8 Dec. 5, 2009
1.3.7 Nov. 20, 2009
1.3.6 Nov. 20, 2009
1.3.5 Nov. 11, 2009
1.3.4 Nov. 9, 2009
1.3.3 Nov. 7, 2009
1.3.2 Oct. 7, 2009
1.3.1 Oct. 6, 2009
1.3.0 Oct. 5, 2009
1.2.1 Sept. 10, 2009
1.2.0 Sept. 9, 2009
1.1.3 Aug. 29, 2009
1.1.2 Aug. 14, 2009
1.1.1 July 22, 2009
1.1.0 July 10, 2009
1.0.3 July 8, 2009
1.0.2 June 24, 2009
1.0.1 May 15, 2009
Date Package Version Action
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.3.8 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.3.9 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.2.1 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.2.0 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.3.6 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.3.7 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.3.0 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.3.1 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.3.2 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.3.3 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.5.0 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.4.1 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.4.0 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.7.0 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.7.1 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.7.2 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.8.0 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.6.1 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.6.0 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.0.1 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.3.4 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.0.3 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.0.2 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.3.5 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.1.2 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.1.3 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.1.0 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug 1.1.1 Release Created
Aug. 24, 2015, 10:58 p.m. django-autoslug Package Created