SettingsΒΆ

Available settings for django-autoslug:

  • AUTOSLUG_SLUGIFY_FUNCTION allows to define a custom slugifying function.

    The function can be repsesented as string or callable, e.g.:

    # custom function, path as string:
    AUTOSLUG_SLUGIFY_FUNCTION = 'some_app.slugify_func'
    
    # custom function, callable:
    AUTOSLUG_SLUGIFY_FUNCTION = some_app.slugify_func
    
    # custom function, defined inline:
    AUTOSLUG_SLUGIFY_FUNCTION = lambda slug: 'can i haz %s?' % slug
    

    Default value is ‘django.template.defaultfilters.slugify’ or, pytils.translit’s slugify function if installed.

Previous topic

Fields

This Page