Comment Comment by sold Since Django 1.10 you can simply use get_random_secret_key in django.core.management.utils.This will not work:if python3: print (SECRET_KEY) else: print SECRET_KEYbecause 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. parent sold 10 years ago
This will not work:
if python3: print (SECRET_KEY) else: print SECRET_KEY
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.