mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-16 23:29:49 +00:00
Update init user reset password, and clean code
This commit is contained in:
@@ -4,8 +4,6 @@
|
||||
import sys
|
||||
import os
|
||||
import re
|
||||
import random
|
||||
import string
|
||||
|
||||
from seaserv import FILE_SERVER_ROOT, FILE_SERVER_PORT, SERVICE_URL
|
||||
|
||||
@@ -353,8 +351,8 @@ REQUIRE_DETAIL_ON_REGISTRATION = False
|
||||
# Account initial password, for password resetting.
|
||||
# INIT_PASSWD can either be a string, or a function (function has to be set without the brackets)
|
||||
def genpassword():
|
||||
return ''.join([random.choice(string.digits + string.letters) for i in range(0, 10)])
|
||||
|
||||
from django.utils.crypto import get_random_string
|
||||
return get_random_string(10)
|
||||
INIT_PASSWD = genpassword
|
||||
|
||||
# browser tab title
|
||||
|
Reference in New Issue
Block a user