reg/utils.py
changeset 6 057498d12450
parent 2 c11afa8623f7
--- a/reg/utils.py	Fri Apr 09 13:21:46 2010 +0530
+++ b/reg/utils.py	Fri Apr 09 15:35:40 2010 +0530
@@ -1,6 +1,6 @@
 import string
 import random
 
-def gen_key():
+def gen_key(no_of_chars):
     allowed_chars = string.digits+string.uppercase
-    return ''.join([random.choice(allowed_chars) for i in range(10)])
+    return ''.join([random.choice(allowed_chars) for i in range(no_of_chars)])