django generate new secret key

from django.core.management.utils import get_random_secret_key  
get_random_secret_key()