Skip to main content

Automatically create a unique slug for a model.

Project description

Automatically create a unique slug for a model.

Note that you don’t need to do obj.slug = … since this method updates the instance’s slug field directly. All you usually need is: unique_slugify(obj, obj.title)

A frequent usage pattern is to override the save method of a model and call unique_slugify before the super(…).save() call.

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-unique-slugify-1.01.tar.gz (1.8 kB view hashes)

Uploaded Source

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