mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-13 22:40:16 +02:00
Add a warning against editing base.py
Beautify local.py by removing big block comments. Move some settings back to base.py which don't need to be in local.py
This commit is contained in:
parent
f8248f46e5
commit
bd5ea38446
@ -1,14 +1,10 @@
|
|||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
"""
|
"""
|
||||||
Django settings for alliance_auth project.
|
DO NOT EDIT THIS FILE
|
||||||
|
|
||||||
Generated by 'django-admin startproject' using Django 1.10.1.
|
This settings file contains everything needed for Alliance Auth projects to function.
|
||||||
|
It gets overwritten by the 'allianceauth update' command.
|
||||||
For more information on this file, see
|
If you wish to make changes, overload the setting in your project's settings file (local.py).
|
||||||
https://docs.djangoproject.com/en/1.10/topics/settings/
|
|
||||||
|
|
||||||
For the full list of settings and their values, see
|
|
||||||
https://docs.djangoproject.com/en/1.10/ref/settings/
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
@ -17,7 +13,6 @@ from django.contrib import messages
|
|||||||
from celery.schedules import crontab
|
from celery.schedules import crontab
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
# Core apps - required to function
|
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
'django.contrib.auth',
|
'django.contrib.auth',
|
||||||
'django.contrib.contenttypes',
|
'django.contrib.contenttypes',
|
||||||
@ -38,6 +33,8 @@ INSTALLED_APPS = [
|
|||||||
'allianceauth.thirdparty.navhelper',
|
'allianceauth.thirdparty.navhelper',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
SECRET_KEY = "wow I'm a really bad default secret key"
|
||||||
|
|
||||||
# Celery configuration
|
# Celery configuration
|
||||||
BROKER_URL = 'redis://localhost:6379/0'
|
BROKER_URL = 'redis://localhost:6379/0'
|
||||||
CELERYBEAT_SCHEDULER = "django_celery_beat.schedulers.DatabaseScheduler"
|
CELERYBEAT_SCHEDULER = "django_celery_beat.schedulers.DatabaseScheduler"
|
||||||
@ -90,7 +87,7 @@ LANGUAGES = (
|
|||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
{
|
{
|
||||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||||
'DIRS': [],
|
'DIRS': [os.path.join(PROJECT_DIR, 'templates')],
|
||||||
'APP_DIRS': True,
|
'APP_DIRS': True,
|
||||||
'OPTIONS': {
|
'OPTIONS': {
|
||||||
'context_processors': [
|
'context_processors': [
|
||||||
@ -148,8 +145,11 @@ USE_TZ = True
|
|||||||
|
|
||||||
# Static files (CSS, JavaScript, Images)
|
# Static files (CSS, JavaScript, Images)
|
||||||
# https://docs.djangoproject.com/en/1.10/howto/static-files/
|
# https://docs.djangoproject.com/en/1.10/howto/static-files/
|
||||||
|
|
||||||
STATIC_URL = '/static/'
|
STATIC_URL = '/static/'
|
||||||
|
STATICFILES_DIRS = [
|
||||||
|
os.path.join(PROJECT_DIR, 'static'),
|
||||||
|
]
|
||||||
|
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
|
||||||
|
|
||||||
# Bootstrap messaging css workaround
|
# Bootstrap messaging css workaround
|
||||||
MESSAGE_TAGS = {
|
MESSAGE_TAGS = {
|
||||||
@ -178,40 +178,20 @@ DATABASES = {
|
|||||||
|
|
||||||
SITE_NAME = 'Alliance Auth'
|
SITE_NAME = 'Alliance Auth'
|
||||||
|
|
||||||
#################
|
LOGIN_URL = 'auth_login_user' # default destination when logging in if no redirect specified
|
||||||
# Login Settings
|
LOGIN_REDIRECT_URL = 'authentication:dashboard' # destination after logging out
|
||||||
#################
|
|
||||||
# LOGIN_REDIRECT_URL - default destination when logging in if no redirect specified
|
|
||||||
# LOGOUT_REDIRECT_URL - destination after logging out
|
|
||||||
# Both of these redirects accept values as per the django redirect shortcut
|
# Both of these redirects accept values as per the django redirect shortcut
|
||||||
# https://docs.djangoproject.com/en/1.11/topics/http/shortcuts/#redirect
|
# https://docs.djangoproject.com/en/1.11/topics/http/shortcuts/#redirect
|
||||||
# - url names eg 'authentication:dashboard'
|
# - url names eg 'authentication:dashboard'
|
||||||
# - relative urls eg '/dashboard'
|
# - relative urls eg '/dashboard'
|
||||||
# - absolute urls eg 'http://example.com/dashboard'
|
# - absolute urls eg 'http://example.com/dashboard'
|
||||||
# LOGIN_TOKEN_SCOPES - scopes required on new tokens when logging in. Cannot be blank.
|
|
||||||
# ACCOUNT_ACTIVATION_DAYS - number of days email verification tokens are valid for
|
# scopes required on new tokens when logging in. Cannot be blank.
|
||||||
##################
|
|
||||||
LOGIN_URL = 'auth_login_user'
|
|
||||||
LOGIN_REDIRECT_URL = 'authentication:dashboard'
|
|
||||||
LOGOUT_REDIRECT_URL = 'authentication:dashboard'
|
|
||||||
LOGIN_TOKEN_SCOPES = ['esi-characters.read_opportunities.v1']
|
LOGIN_TOKEN_SCOPES = ['esi-characters.read_opportunities.v1']
|
||||||
|
|
||||||
|
# number of days email verification links are valid for
|
||||||
ACCOUNT_ACTIVATION_DAYS = 1
|
ACCOUNT_ACTIVATION_DAYS = 1
|
||||||
|
|
||||||
#####################################################
|
|
||||||
##
|
|
||||||
## Logging Configuration
|
|
||||||
##
|
|
||||||
#####################################################
|
|
||||||
# Set log_file and console level to desired state:
|
|
||||||
# DEBUG - basically stack trace, explains every step
|
|
||||||
# INFO - model creation, deletion, updates, etc
|
|
||||||
# WARN - unexpected function outcomes that do not impact user
|
|
||||||
# ERROR - unexcpeted function outcomes which prevent user from achieving desired outcome
|
|
||||||
# EXCEPTION - something critical went wrong, unhandled
|
|
||||||
#####################################
|
|
||||||
# Recommended level for log_file is INFO, console is DEBUG
|
|
||||||
# Change log level of individual apps below to narrow your debugging
|
|
||||||
#####################################
|
|
||||||
LOGGING = {
|
LOGGING = {
|
||||||
'version': 1,
|
'version': 1,
|
||||||
'disable_existing_loggers': False,
|
'disable_existing_loggers': False,
|
||||||
|
@ -1,49 +1,29 @@
|
|||||||
|
# Every setting in base.py can be overloaded by redefining it here.
|
||||||
from .base import *
|
from .base import *
|
||||||
|
|
||||||
# These are required for Django to function properly
|
# These are required for Django to function properly. Don't touch.
|
||||||
ROOT_URLCONF = '{{ project_name }}.urls'
|
ROOT_URLCONF = '{{ project_name }}.urls'
|
||||||
WSGI_APPLICATION = '{{ project_name }}.wsgi.application'
|
WSGI_APPLICATION = '{{ project_name }}.wsgi.application'
|
||||||
STATICFILES_DIRS = [
|
|
||||||
os.path.join(PROJECT_DIR, 'static'),
|
|
||||||
]
|
|
||||||
STATIC_ROOT = "/var/www/{{ project_name }}/static/"
|
|
||||||
TEMPLATES[0]['DIRS'] += [os.path.join(PROJECT_DIR, 'templates')]
|
|
||||||
SECRET_KEY = '{{ secret_key }}'
|
SECRET_KEY = '{{ secret_key }}'
|
||||||
|
|
||||||
#######################################
|
# This is where css/images will be placed for your webserver to read
|
||||||
# Site Name #
|
STATIC_ROOT = "/var/www/{{ project_name }}/static/"
|
||||||
#######################################
|
|
||||||
# Change this to change the name of the
|
# Change this to change the name of the auth site displayed
|
||||||
# auth site displayed in page titles
|
# in page titles and the site header.
|
||||||
# and the site header.
|
|
||||||
#######################################
|
|
||||||
SITE_NAME = '{{ project_name }}'
|
SITE_NAME = '{{ project_name }}'
|
||||||
|
|
||||||
#######################################
|
# Change this to enable/disable debug mode, which displays
|
||||||
# Debug Mode #
|
# useful error messages but can leak sensitive data.
|
||||||
#######################################
|
|
||||||
# Change this to enable/disable debug
|
|
||||||
# mode, which displays useful error
|
|
||||||
# messages but can leak sensitive data.
|
|
||||||
#######################################
|
|
||||||
DEBUG = False
|
DEBUG = False
|
||||||
|
|
||||||
#######################################
|
|
||||||
# Additional Applications #
|
|
||||||
#######################################
|
|
||||||
# Add any additional apps to this list.
|
# Add any additional apps to this list.
|
||||||
#######################################
|
|
||||||
INSTALLED_APPS += [
|
INSTALLED_APPS += [
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
#######################################
|
# Uncomment by removing the """ and change the database name and
|
||||||
# Database Settings #
|
# credentials to use MySQL/MariaDB. Leave commented to use sqlite3
|
||||||
#######################################
|
|
||||||
# Uncomment and change the database name
|
|
||||||
# and credentials to use MySQL/MariaDB.
|
|
||||||
# Leave commented to use sqlite3
|
|
||||||
#######################################
|
|
||||||
"""
|
"""
|
||||||
DATABASES['default'] = {
|
DATABASES['default'] = {
|
||||||
'ENGINE': 'django.db.backends.mysql',
|
'ENGINE': 'django.db.backends.mysql',
|
||||||
@ -55,32 +35,18 @@ DATABASES['default'] = {
|
|||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#######################################
|
# Register an application at https://developers.eveonline.com
|
||||||
# SSO Settings #
|
# and fill out these settings. Be sure to set the callback URL to
|
||||||
#######################################
|
# https://example.com/sso/callback substituting your domain for example.com
|
||||||
# Register an application at
|
# Select all available scopes starting with esi-
|
||||||
# https://developers.eveonline.com
|
|
||||||
# and fill out these settings.
|
|
||||||
# Be sure to set the callback URL to
|
|
||||||
# https://example.com/sso/callback
|
|
||||||
# substituting your domain for example.com
|
|
||||||
# Select all available esi- scopes.
|
|
||||||
#######################################
|
|
||||||
ESI_SSO_CLIENT_ID = ''
|
ESI_SSO_CLIENT_ID = ''
|
||||||
ESI_SSO_CLIENT_SECRET = ''
|
ESI_SSO_CLIENT_SECRET = ''
|
||||||
ESI_SSO_CALLBACK_URL = ''
|
ESI_SSO_CALLBACK_URL = ''
|
||||||
|
|
||||||
#######################################
|
# Emails are validated before new users can log in.
|
||||||
# Email Settings #
|
# It's recommended to use a free service like SparkPost or Mailgun to send email.
|
||||||
#######################################
|
|
||||||
# Alliance Auth validates emails before
|
|
||||||
# new users can log in.
|
|
||||||
# It's recommended to use a free service
|
|
||||||
# like SparkPost or Mailgun to send email.
|
|
||||||
# https://www.sparkpost.com/docs/integrations/django/
|
# https://www.sparkpost.com/docs/integrations/django/
|
||||||
# Set the default from email to something
|
# Set the default from email to something like 'noreply@example.com'
|
||||||
# like 'noreply@example.com'
|
|
||||||
#######################################
|
|
||||||
EMAIL_HOST = ''
|
EMAIL_HOST = ''
|
||||||
EMAIL_PORT = 587
|
EMAIL_PORT = 587
|
||||||
EMAIL_HOST_USER = ''
|
EMAIL_HOST_USER = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user