Roundup Tracker - Issues

Issue 2550659

classification
Add a register_propclass function to templating.py
Type: rfe Severity: normal
Components: Infrastructure Versions: 1.4
process
Status: closed accepted
:
: : ezio.melotti, richard
Priority: : patch

Created on 2010-07-23 16:35 by ezio.melotti, last changed 2010-07-24 09:45 by richard.

Files
File name Uploaded Description Edit Remove
register_propclass.diff ezio.melotti, 2010-07-23 16:35 Patch that adds a register_propclass function and refactors StringHTMLProperty to make it more extensible
Messages
msg4100 Author: [hidden] (ezio.melotti) Date: 2010-07-23 16:35
In templating.py the StringHTMLProperty has an hyperlinked() method that
linkifies URLs, emails and items, but there's no way to linkify only
URLs or only emails or any other intermediate combination.
The attached patch:
 1) breaks the content of _hyper_repl and changes it to call 3 different
methods (for URLs, emails, and items).
 2) adds a register_propclass function that allow to register other classes.
In this way is possible to subclass StringHTMLProperty, override any of
the 3 methods, and use the new subclass instead of StringHTMLProperty.
msg4101 Author: [hidden] (richard) Date: 2010-07-24 09:45
Accepted, thanks!
History
Date User Action Args
2010-07-24 09:45:10richardsetstatus: new -> closed
resolution: accepted
messages: + msg4101
nosy: + richard
2010-07-23 16:35:09ezio.melotticreate