Pluf Framework

Issue 517: slug: a new type of fields

Reported by Mehdi Kabab, Aug 11, 2010

This field will automatically slugify its content.

A slug is a short label for something, containing only letters, 
numbers, underscores or hyphens. They're generally used in URLs.

In your model, you can specify `max_length` in the `widget_attrs` 
parameter. If `max_length` is not specified, Pluf will use a default 
length of 50.

**Note:**  
In your model, the `size` and `widget_attrs['maxlength']` parameters 
are not equivalent. The `size` is not used in calculating the 
maximum size of the field (fault Pluf).

Comment 1 by Mehdi Kabab, Aug 11, 2010

Do not apply now, the support of accented characters is missing (in 
my todolist).

Comment 2 by Mehdi Kabab, Aug 11, 2010

See attached patch.

Comment 3 by Mehdi Kabab, Aug 27, 2010

See commit d594a0c.
Status: Fixed

Created: 2 years 10 months ago by Mehdi Kabab

Updated: 2 years 9 months ago

Status: Fixed

Labels:
Priority:Medium
Type:Patch