Siah wrote:

>Please let me know if this feature is available, or else I'll find out
>how to implement it as a filter myself. 
>  
>
A filter would look simple:

    def truncate(value,arg):
        return value[0:arg]

However it won't work for international characters. This will:

    from django.conf.settings import DEFAULT_CHARSET

    def truncate(value,arg):
        return value.decode(DEFAULT_CHARSET)[0:arg].encode(DEFAULT_CHARSET)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to