django-autoslug
~~~~~~~~~~~~~~~
.. image:: https://img.shields.io/travis/justinmayer/django-autoslug.svg
:target: https://travis-ci.org/justinmayer/django-autoslug
.. image:: https://img.shields.io/pypi/format/django-autoslug.svg
:target: https://pypi.python.org/pypi/django-autoslug
.. image:: https://img.shields.io/pypi/status/django-autoslug.svg
:target: https://pypi.python.org/pypi/django-autoslug
.. image:: https://img.shields.io/pypi/v/django-autoslug.svg
:target: https://pypi.python.org/pypi/django-autoslug
.. image:: https://img.shields.io/pypi/pyversions/django-autoslug.svg
:target: https://pypi.python.org/pypi/django-autoslug
.. image:: https://img.shields.io/pypi/dd/django-autoslug.svg
:target: https://pypi.python.org/pypi/django-autoslug
.. image:: https://readthedocs.org/projects/django-autoslug/badge/?version=latest
:target: https://django-autoslug.readthedocs.io/en/latest/
Django-autoslug is a reusable Django library that provides an improved
slug field which can automatically:
a) populate itself from another field,
b) preserve uniqueness of the value and
c) use custom ``slugify()`` functions for better i18n.
The field is highly configurable.
Requirements
------------
*Python 3.5+ or PyPy*.
*Django 1.11* or higher.
It may be possible to successfully use django-autoslug in other environments
but they are not tested.
.. note::
PyPy3 is not officially supported only because there were some problems with
permissions and ``__pycache__`` on CI unrelated to django-autoslug itself.
Examples
--------
A simple example:
.. code-block:: python
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:
.. code-block:: python
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 the `complete documentation <https://django-autoslug.readthedocs.org>`_
on ReadTheDocs. It is built automatically for the latest version.
Community
---------
This application is maintained by Justin Mayer. It was initially created by
Andy Mikhailenko and then improved by other developers. They are listed in
``AUTHORS.rst``.
Please feel free to file issues and/or submit patches.
See ``CONTRIBUTING.rst`` 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 <http://gnu.org/licenses/>`_.
Raw data
{
"_id": null,
"home_page": "https://github.com/justinmayer/django-autoslug/",
"name": "django-autoslug",
"maintainer": "",
"docs_url": "https://pythonhosted.org/django-autoslug/",
"requires_python": "",
"maintainer_email": "",
"keywords": "django field slug auto unique transliteration i18n",
"author": "Justin Mayer",
"author_email": "entrop@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/4f/42/9238fe32de69a2e05daf2cb3dc8dabbfb278cc4dc11a713e2802fd3e48ea/django-autoslug-1.9.8.tar.gz",
"platform": "",
"description": "django-autoslug\n~~~~~~~~~~~~~~~\n\n.. image:: https://img.shields.io/travis/justinmayer/django-autoslug.svg\n :target: https://travis-ci.org/justinmayer/django-autoslug\n\n.. image:: https://img.shields.io/pypi/format/django-autoslug.svg\n :target: https://pypi.python.org/pypi/django-autoslug\n\n.. image:: https://img.shields.io/pypi/status/django-autoslug.svg\n :target: https://pypi.python.org/pypi/django-autoslug\n\n.. image:: https://img.shields.io/pypi/v/django-autoslug.svg\n :target: https://pypi.python.org/pypi/django-autoslug\n\n.. image:: https://img.shields.io/pypi/pyversions/django-autoslug.svg\n :target: https://pypi.python.org/pypi/django-autoslug\n\n.. image:: https://img.shields.io/pypi/dd/django-autoslug.svg\n :target: https://pypi.python.org/pypi/django-autoslug\n\n.. image:: https://readthedocs.org/projects/django-autoslug/badge/?version=latest\n :target: https://django-autoslug.readthedocs.io/en/latest/\n\nDjango-autoslug is a reusable Django library that provides an improved\nslug field which can automatically:\n\na) populate itself from another field,\nb) preserve uniqueness of the value and\nc) use custom ``slugify()`` functions for better i18n.\n\nThe field is highly configurable.\n\nRequirements\n------------\n\n*Python 3.5+ or PyPy*.\n\n*Django 1.11* or higher.\n\nIt may be possible to successfully use django-autoslug in other environments\nbut they are not tested.\n\n.. note::\n\n PyPy3 is not officially supported only because there were some problems with\n permissions and ``__pycache__`` on CI unrelated to django-autoslug itself.\n\nExamples\n--------\n\nA simple example:\n\n.. code-block:: python\n\n from django.db.models import CharField, Model\n from autoslug import AutoSlugField\n\n class Article(Model):\n title = CharField(max_length=200)\n slug = AutoSlugField(populate_from='title')\n\nMore complex example:\n\n.. code-block:: python\n\n from django.db.models import CharField, DateField, ForeignKey, Model\n from django.contrib.auth.models import User\n from autoslug import AutoSlugField\n\n class Article(Model):\n title = CharField(max_length=200)\n pub_date = DateField(auto_now_add=True)\n author = ForeignKey(User)\n slug = AutoSlugField(populate_from=lambda instance: instance.title,\n unique_with=['author__name', 'pub_date__month'],\n slugify=lambda value: value.replace(' ','-'))\n\nDocumentation\n-------------\n\nSee the `complete documentation <https://django-autoslug.readthedocs.org>`_\non ReadTheDocs. It is built automatically for the latest version.\n\nCommunity\n---------\n\nThis application is maintained by Justin Mayer. It was initially created by\nAndy Mikhailenko and then improved by other developers. They are listed in\n``AUTHORS.rst``.\n\nPlease feel free to file issues and/or submit patches.\n\nSee ``CONTRIBUTING.rst`` for hints related to the preferred workflow.\n\n\nLicensing\n---------\n\nDjango-autoslug is free software; you can redistribute it and/or\nmodify it under the terms of the GNU Lesser General Public License as\npublished by the Free Software Foundation; either version 3 of the\nLicense, or (at your option) any later version.\n\nDjango-autoslug is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nLesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public\nLicense along with this program; see the file COPYING.LESSER. If not,\nsee `GNU licenses <http://gnu.org/licenses/>`_.\n\n\n",
"bugtrack_url": null,
"license": "GNU Lesser General Public License (LGPL), Version 3",
"summary": "An automated slug field for Django.",
"version": "1.9.8",
"split_keywords": [
"django",
"field",
"slug",
"auto",
"unique",
"transliteration",
"i18n"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "905df610c1854c0bdaa92cbd5bfca2b0",
"sha256": "26459eeddec207e307c55777a10fc25d17f4978753695340b16a17ed248a6f70"
},
"downloads": -1,
"filename": "django_autoslug-1.9.8-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "905df610c1854c0bdaa92cbd5bfca2b0",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 14582,
"upload_time": "2020-07-22T08:27:57",
"upload_time_iso_8601": "2020-07-22T08:27:57.863221Z",
"url": "https://files.pythonhosted.org/packages/cc/f1/1064ad6533f1664416774ebebceabc1d4f904ff65850e3a6c8fc26f05b03/django_autoslug-1.9.8-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "2c4030f9d15f86837fa9dcb5cc2f10ac",
"sha256": "bae66c27d35615f472865b99c4d107f3b3add3d22ee337e84960fc07694abd45"
},
"downloads": -1,
"filename": "django-autoslug-1.9.8.tar.gz",
"has_sig": false,
"md5_digest": "2c4030f9d15f86837fa9dcb5cc2f10ac",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 24511,
"upload_time": "2020-07-22T08:27:59",
"upload_time_iso_8601": "2020-07-22T08:27:59.214567Z",
"url": "https://files.pythonhosted.org/packages/4f/42/9238fe32de69a2e05daf2cb3dc8dabbfb278cc4dc11a713e2802fd3e48ea/django-autoslug-1.9.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2020-07-22 08:27:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "justinmayer",
"github_project": "django-autoslug",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"tox": true,
"lcname": "django-autoslug"
}