When we run django-admin.py, it generates SECRET_KEY and writes that
value. Now if we create some apps and these apps are downloaded and
used as-is by the users they end up sharing the SECRET_KEY.
That setting recommends that "# Make this unique, and don't share it
with anybody."
Wont it be better if we had something like,
try:
    SECRET_KEY = open('secret.txt').read().strip()
except IOError:
    try:
        SECRET_KEY =
''.join([choice('[EMAIL PROTECTED]&*(-_=+)')
for i in range(50)])
        secret = file('secret.txt', 'w')
        secret.write(secret_key)
        secret.close()
    except IOError:
        Exception('Please create a secret.txt file with random
characters to generate your secret key!')
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to