Open i-m-d opened 4 years ago
Move your function outside of the class, and remove the self parameter:
def slugify_sierra(value):
return default_slugify(value.replace('/', '-'))
class Cimas(models.Model):
# more code here
sierra_slug = AutoSlugField(
max_length = 150,
populate_from = 'c_sierra',
slugify=slugify_sierra,
)
# more code here
Hello,
i have the following:
When i edit a record slug filed is change correctly without error, but when a use Model.save() in shell or in a funcition i've got this error:
What am i doing wrong ?
What i want to do is change some Cimas fileds (not slug filed) from a function
Verison: django-autoslug 1.9.8
NOTE: sorry for my bad English.
Thank you.