Since Django 1.10 you can simply use get_random_secret_key in django.core.management.utils.<p>This will not work:<p>if python3:
print (SECRET_KEY)
else:
print SECRET_KEY<p>because it's a syntax error in Python 3. Instead, you can just write "print (SECRET_KEY)", this works in both versions and has the same effect.