use a string, not bytes
This commit is contained in:
parent
2bdd07c9af
commit
5d204a4012
1 changed files with 1 additions and 2 deletions
|
@ -11,8 +11,7 @@ from utils import first
|
||||||
from .database import db
|
from .database import db
|
||||||
from .user import User
|
from .user import User
|
||||||
|
|
||||||
BASE58_ALPHABET = \
|
BASE58_ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
|
||||||
b'123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
|
|
||||||
|
|
||||||
def generate_slug():
|
def generate_slug():
|
||||||
secret = ''.join(secrets.choice(BASE58_ALPHABET) for i in range(7))
|
secret = ''.join(secrets.choice(BASE58_ALPHABET) for i in range(7))
|
||||||
|
|
Loading…
Reference in a new issue