mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-21 15:32:14 +00:00
FEAT(Asset): Add ability to generate whole page of labels
This commit is contained in:
@@ -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:]
|
||||
|
||||
Reference in New Issue
Block a user