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_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.

parent sold 10 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton