mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
25 lines
473 B
Python
25 lines
473 B
Python
import urllib.parse
|
|
|
|
|
|
class AssetIDConverter: # Forces lowercase to uppercase
|
|
regex = '[^/]+'
|
|
|
|
def to_python(self, value):
|
|
return str(value).upper()
|
|
|
|
def to_url(self, value):
|
|
return str(value).upper()
|
|
|
|
|
|
class ListConverter:
|
|
regex = '[^/]+'
|
|
|
|
def to_python(self, value):
|
|
return value.split(',')
|
|
|
|
def to_url(self, value):
|
|
string = ""
|
|
for i in value:
|
|
string += "," + str(i)
|
|
return string[1:]
|