9 lines
170 B
Python
9 lines
170 B
Python
|
class SignedIntConverter:
|
||
|
regex = '[+-]?[0-9]+'
|
||
|
|
||
|
def to_python(self, value):
|
||
|
return int(value)
|
||
|
|
||
|
def to_url(self, value):
|
||
|
return '%+d' % value
|