FEAT(Asset): Add ability to generate whole page of labels

This commit is contained in:
2021-12-31 12:17:46 +00:00
parent fdbdaab52e
commit 484f155e43
10 changed files with 150 additions and 27 deletions

View File

@@ -1,3 +1,6 @@
import urllib.parse
class AssetIDConverter: # Forces lowercase to uppercase
regex = '[^/]+'
@@ -6,3 +9,16 @@ class AssetIDConverter: # Forces lowercase to uppercase
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:]