Hi

  I am implementing such a function. I have a textarea that will be
inputted many characters, when they are showed in page, they will be
displayed in one line, very ugly.So I want to change the '\n' in the
texts to '<br/>'. I know this can be implemented by wysiwig editor(e.g.
tiny_mce), and I have implemented this.But since i just want to change
'\n' to '<br/>', maybe it is not necessary to include such a big vendor
package of tiny_mce in my project.

  I found django has such filters, including escape|linebreaks, that is
just used to change '\n' to <br/> in the template level by the
following lines :{{ text|escape|linebreaks }} . I want to know, could I
implement this kind of function in the model level?
  In django's style, it show all the filef by the following lines :{%
filter_interface_script_maybe bound_field %}, but the tag of
filter_interface_script_maybe can only be used agains filter_interface
parameter, which is just used on many_to_many field. What i want to is
to use such a parameter to a meta.TEXTFIELD. I am not sure wheter this
is possible.

  Thanks for any helps.

Steve

Reply via email to