Skip to main content

Intelligent slug computing

Project description

A slug field that automatically calculates its value from another attribute or method.

Requirements

django-aislug depends on django-stringfield.

Installation

Using pip to install will install django-aislug and all of its dependencies:

pip install django-aislug

Options

All options that are available for django.db.models.CharField are also available to AISlugField. There are some additional options:

  • populate_from: Property or method on the model that is the base for the computed slug.

    • Default 'title'

  • slugify: User defined slugify callback function to compute the slug from populate_from

  • invalid: List or function that returns a list of invalid values

    • Default: []

  • update: If False the slug will not be updated from populate_from on subsequent saves.

    • Default: False

  • unique_for: A list of fields to make this slug unique for.

    • Default: None

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-aislug-0.2.1.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file django-aislug-0.2.1.tar.gz.

File metadata

File hashes

Hashes for django-aislug-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e68a8d96641ac8983ee87f65888e30173718bf4956aacff258b5402c5cf40a35
MD5 b368d95f14b094581812945a14554f3a
BLAKE2b-256 e1f1c997745eff162750357f20695c94bd8ec52be6603432c32389d369c27134

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page