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: []
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
File details
Details for the file django-aislug-0.2.2.tar.gz
.
File metadata
- Download URL: django-aislug-0.2.2.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d114557cbba27b39eab1a24bc387ad1dbe90a2f85d0bbd0bd20fe22da7059c2a |
|
MD5 | 594cac668a97a456c48dc2951b07fbb4 |
|
BLAKE2b-256 | 77e6dd74c79b9acfc8caaffc3fba6db1416a831e1ccc54cb141ec21a6d43b17a |