Merge pull request #2305 from jakzo/fix-id-generation
Fix ID generation
This commit is contained in:
commit
3a92d0f016
@ -1,9 +1,10 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import six
|
import six
|
||||||
import random
|
import random
|
||||||
|
import string
|
||||||
|
|
||||||
|
|
||||||
def create_id():
|
def create_id():
|
||||||
size = 10
|
size = 10
|
||||||
chars = list(range(10)) + ['A-Z']
|
chars = list(range(10)) + list(string.ascii_lowercase)
|
||||||
return ''.join(six.text_type(random.choice(chars)) for x in range(size))
|
return ''.join(six.text_type(random.choice(chars)) for x in range(size))
|
||||||
|
Loading…
Reference in New Issue
Block a user