Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/liangliangyy/DjangoBlog
/ generate_code
Function
generate_code
djangoblog/utils.py:138–140 ·
view source on GitHub ↗
生成随机数验证码
()
Source
from the content-addressed store, hash-verified
136
137
138
def
generate_code() -> str:
139
""
"生成随机数验证码"
""
140
return
''
.join(random.sample(string.digits, 6))
141
142
143
def
parse_dict_to_url(dict):
Callers
4
post
Method · 0.90
test_verify_email_code
Method · 0.85
test_forget_password_email_success
Method · 0.85
test_forget_password_email_code_error
Method · 0.85
Calls
no outgoing calls
Tested by
3
test_verify_email_code
Method · 0.68
test_forget_password_email_success
Method · 0.68
test_forget_password_email_code_error
Method · 0.68