1
0
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:
zhengxie
2016-03-01 16:56:24 +08:00
parent d6d514f7e3
commit a14c10a8fc
4 changed files with 2 additions and 97 deletions

View File

@@ -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