mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-12-14 15:52:25 +03:00
Rename LocalizedMagicSlugField to LocalizedUniqueSlugField
This commit is contained in:
@@ -197,7 +197,7 @@ Other fields
|
||||
^^^^^^^^^^^^
|
||||
Besides ``LocalizedField``, there's also:
|
||||
|
||||
* ``LocalizedMagicSlugField``
|
||||
* ``LocalizedUniqueSlugField``
|
||||
Successor of ``LocalizedAutoSlugField`` that fixes concurrency issues and enforces
|
||||
uniqueness of slugs on a database level. Usage is the exact same:
|
||||
|
||||
@@ -205,11 +205,11 @@ Besides ``LocalizedField``, there's also:
|
||||
|
||||
from localized_fields.models import LocalizedModel
|
||||
from localized_fields.fields import (LocalizedField,
|
||||
LocalizedMagicSlugField)
|
||||
LocalizedUniqueSlugField)
|
||||
|
||||
class MyModel(LocalizedModel):
|
||||
title = LocalizedField()
|
||||
slug = LocalizedMagicSlugField(populate_from='title')
|
||||
slug = LocalizedUniqueSlugField(populate_from='title')
|
||||
|
||||
* ``LocalizedAutoSlugField``
|
||||
Automatically creates a slug for every language from the specified field.
|
||||
@@ -226,7 +226,7 @@ Besides ``LocalizedField``, there's also:
|
||||
title = LocalizedField()
|
||||
slug = LocalizedAutoSlugField(populate_from='title')
|
||||
|
||||
This implementation is **NOT** concurrency safe, prefer ``LocalizedMagicSlugField``.
|
||||
This implementation is **NOT** concurrency safe, prefer ``LocalizedUniqueSlugField``.
|
||||
|
||||
* ``LocalizedBleachField``
|
||||
Automatically bleaches the content of the field.
|
||||
|
||||
Reference in New Issue
Block a user