[Answered ]-'+' in django form

2👍

Without access to a machine with python I cant test but you should be able to do:

  c = tuple(("%g" % x , "%+g" % x) for x in i0)

http://docs.python.org/release/3.0/library/stdtypes.html#old-string-formatting-operations

Should also work in earlier python versions

EDIT:- to remove the + from a Zero value:

 c = tuple(("%g" % x , "%+g" % x) for x in i0 if x != 0 else ("0", "0"))

0👍

define this field as characters, but do validation in Integer. this should be the fast solution

Leave a comment