mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-25 07:20:59 +02:00
use fallback random secret key
This commit is contained in:
@@ -2,6 +2,7 @@ __package__ = 'archivebox.core'
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
from django.utils.crypto import get_random_string
|
||||||
|
|
||||||
|
|
||||||
from ..config import (
|
from ..config import (
|
||||||
@@ -18,6 +19,8 @@ from ..config import (
|
|||||||
ALLOWED_HOSTS = ALLOWED_HOSTS.split(',')
|
ALLOWED_HOSTS = ALLOWED_HOSTS.split(',')
|
||||||
IS_SHELL = 'shell' in sys.argv[:3] or 'shell_plus' in sys.argv[:3]
|
IS_SHELL = 'shell' in sys.argv[:3] or 'shell_plus' in sys.argv[:3]
|
||||||
|
|
||||||
|
SECRET_KEY = SECRET_KEY or get_random_string(50, 'abcdefghijklmnopqrstuvwxyz0123456789-_+!.')
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
'django.contrib.auth',
|
'django.contrib.auth',
|
||||||
'django.contrib.contenttypes',
|
'django.contrib.contenttypes',
|
||||||
|
Reference in New Issue
Block a user