2017-03-20 07:38:44 +01:00
|
|
|
"""
|
|
|
|
Django settings for django-helpdesk demodesk project.
|
|
|
|
|
|
|
|
For more information on this file, see
|
2017-12-18 06:28:03 +01:00
|
|
|
https://docs.djangoproject.com/en/1.11/topics/settings/
|
2017-03-20 07:38:44 +01:00
|
|
|
|
|
|
|
For the full list of settings and their values, see
|
2017-12-18 06:28:03 +01:00
|
|
|
https://docs.djangoproject.com/en/1.11/ref/settings/
|
2017-03-20 07:38:44 +01:00
|
|
|
"""
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
|
|
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
|
|
|
|
|
|
|
|
# Quick-start development settings - unsuitable for production
|
2017-12-18 06:28:03 +01:00
|
|
|
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
|
2017-03-20 07:38:44 +01:00
|
|
|
|
|
|
|
# SECURITY WARNING: keep the secret key used in production secret!
|
|
|
|
SECRET_KEY = '_crkn1+fnzu5$vns_-d+^ayiq%z4k*s!!ag0!mfy36(y!vrazd'
|
|
|
|
|
|
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
|
|
DEBUG = True
|
|
|
|
|
|
|
|
ALLOWED_HOSTS = []
|
|
|
|
|
|
|
|
|
|
|
|
# Application definition
|
|
|
|
|
|
|
|
INSTALLED_APPS = [
|
|
|
|
'django.contrib.admin',
|
|
|
|
'django.contrib.auth',
|
|
|
|
'django.contrib.contenttypes',
|
|
|
|
'django.contrib.sessions',
|
|
|
|
'django.contrib.messages',
|
|
|
|
'django.contrib.staticfiles',
|
|
|
|
'django.contrib.sites',
|
|
|
|
'django.contrib.humanize',
|
2018-09-03 05:27:39 +02:00
|
|
|
'bootstrap4form',
|
2020-07-20 16:41:22 +02:00
|
|
|
|
|
|
|
'account', # Required by pinax-teams
|
|
|
|
'pinax.invitations', # required by pinax-teams
|
|
|
|
'pinax.teams', # team support
|
|
|
|
'helpdesk', # This is us!
|
|
|
|
'reversion', # required by pinax-teams
|
2017-03-20 07:38:44 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
MIDDLEWARE = [
|
|
|
|
'django.middleware.security.SecurityMiddleware',
|
|
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
|
|
'django.middleware.common.CommonMiddleware',
|
|
|
|
'django.middleware.csrf.CsrfViewMiddleware',
|
|
|
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
|
|
'django.contrib.messages.middleware.MessageMiddleware',
|
|
|
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
|
|
|
]
|
|
|
|
|
2020-10-08 22:05:48 +02:00
|
|
|
ROOT_URLCONF = 'demo.demodesk.config.urls'
|
2017-03-20 07:38:44 +01:00
|
|
|
|
|
|
|
TEMPLATES = [
|
|
|
|
{
|
|
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
|
|
'DIRS': [],
|
|
|
|
'APP_DIRS': True,
|
|
|
|
'OPTIONS': {
|
2017-10-30 05:56:06 +01:00
|
|
|
'debug': True,
|
2017-03-20 07:38:44 +01:00
|
|
|
'context_processors': [
|
|
|
|
'django.template.context_processors.debug',
|
|
|
|
'django.template.context_processors.request',
|
|
|
|
'django.contrib.auth.context_processors.auth',
|
|
|
|
'django.contrib.messages.context_processors.messages',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
|
2020-10-08 22:05:48 +02:00
|
|
|
WSGI_APPLICATION = 'demo.demodesk.config.wsgi.application'
|
2017-03-20 07:38:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
# django-helpdesk configuration settings
|
|
|
|
# You can override django-helpdesk's defaults by redefining them here.
|
|
|
|
# To see what settings are available, see the docs/configuration.rst
|
|
|
|
# file for more information.
|
|
|
|
# Some common settings are below.
|
|
|
|
|
|
|
|
HELPDESK_DEFAULT_SETTINGS = {
|
|
|
|
'use_email_as_submitter': True,
|
|
|
|
'email_on_ticket_assign': True,
|
|
|
|
'email_on_ticket_change': True,
|
|
|
|
'login_view_ticketlist': True,
|
|
|
|
'email_on_ticket_apichange': True,
|
|
|
|
'preset_replies': True,
|
|
|
|
'tickets_per_page': 25
|
|
|
|
}
|
|
|
|
|
|
|
|
# Should the public web portal be enabled?
|
|
|
|
HELPDESK_PUBLIC_ENABLED = True
|
|
|
|
HELPDESK_VIEW_A_TICKET_PUBLIC = True
|
|
|
|
HELPDESK_SUBMIT_A_TICKET_PUBLIC = True
|
|
|
|
|
|
|
|
# Should the Knowledgebase be enabled?
|
|
|
|
HELPDESK_KB_ENABLED = True
|
|
|
|
|
2019-03-10 00:38:24 +01:00
|
|
|
# Allow users to change their passwords
|
|
|
|
HELPDESK_SHOW_CHANGE_PASSWORD = True
|
|
|
|
|
2017-03-20 07:38:44 +01:00
|
|
|
# Instead of showing the public web portal first,
|
|
|
|
# we can instead redirect users straight to the login page.
|
|
|
|
HELPDESK_REDIRECT_TO_LOGIN_BY_DEFAULT = False
|
2021-01-04 20:02:25 +01:00
|
|
|
LOGIN_URL = 'helpdesk:login'
|
|
|
|
LOGIN_REDIRECT_URL = 'helpdesk:home'
|
2017-03-20 07:38:44 +01:00
|
|
|
|
|
|
|
# Database
|
|
|
|
# - by default, we use SQLite3 for the demo, but you can also
|
|
|
|
# configure MySQL or PostgreSQL, see the docs for more:
|
2017-12-18 06:28:03 +01:00
|
|
|
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
|
2017-03-20 07:38:44 +01:00
|
|
|
|
|
|
|
DATABASES = {
|
|
|
|
'default': {
|
|
|
|
'ENGINE': 'django.db.backends.sqlite3',
|
|
|
|
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Sites
|
|
|
|
# - this allows hosting of more than one site from a single server,
|
|
|
|
# in practice you can probably just leave this default if you only
|
|
|
|
# host a single site, but read more in the docs:
|
2017-12-18 06:28:03 +01:00
|
|
|
# https://docs.djangoproject.com/en/1.11/ref/contrib/sites/
|
2017-03-20 07:38:44 +01:00
|
|
|
|
|
|
|
SITE_ID = 1
|
|
|
|
|
|
|
|
|
|
|
|
# Sessions
|
2017-12-18 06:28:03 +01:00
|
|
|
# https://docs.djangoproject.com/en/1.11/topics/http/sessions
|
2017-03-20 07:38:44 +01:00
|
|
|
|
|
|
|
SESSION_COOKIE_AGE = 86400 # = 1 day
|
|
|
|
|
|
|
|
# For better default security, set these cookie flags, but
|
|
|
|
# these are likely to cause problems when testing locally
|
|
|
|
#CSRF_COOKIE_SECURE = True
|
|
|
|
#SESSION_COOKIE_SECURE = True
|
|
|
|
#CSRF_COOKIE_HTTPONLY = True
|
|
|
|
#SESSION_COOKIE_HTTPONLY = True
|
|
|
|
|
|
|
|
|
|
|
|
# Password validation
|
2017-12-18 06:28:03 +01:00
|
|
|
# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators
|
2017-03-20 07:38:44 +01:00
|
|
|
|
|
|
|
AUTH_PASSWORD_VALIDATORS = [
|
|
|
|
{
|
|
|
|
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
|
|
|
},
|
|
|
|
]
|
|
|
|
|
|
|
|
# Email
|
2017-12-18 06:28:03 +01:00
|
|
|
# https://docs.djangoproject.com/en/1.11/topics/email/
|
2017-03-20 07:38:44 +01:00
|
|
|
|
|
|
|
# This demo uses the console backend, which simply prints emails to the console
|
|
|
|
# rather than actually sending them out.
|
|
|
|
DEFAULT_FROM_EMAIL = 'helpdesk@example.com'
|
|
|
|
SERVER_EMAIL = 'helpdesk@example.com'
|
|
|
|
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
|
|
|
|
|
|
|
# If you want to test sending real emails, uncomment and modify the following:
|
|
|
|
#EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
|
|
|
#EMAIL_HOST = 'smtp.example.com'
|
|
|
|
#EMAIL_PORT = '25'
|
|
|
|
|
|
|
|
# Internationalization
|
2017-12-18 06:28:03 +01:00
|
|
|
# https://docs.djangoproject.com/en/1.11/topics/i18n/
|
2017-03-20 07:38:44 +01:00
|
|
|
|
|
|
|
# By default, django-helpdesk uses en, but other languages are also available.
|
2017-12-18 06:28:03 +01:00
|
|
|
# The most complete translations are: es-MX, ru, zh-Hans
|
2017-03-20 07:38:44 +01:00
|
|
|
# Contribute to our translations via Transifex if you can!
|
|
|
|
# See CONTRIBUTING.rst for more info.
|
|
|
|
LANGUAGE_CODE = 'en-US'
|
|
|
|
|
|
|
|
TIME_ZONE = 'UTC'
|
|
|
|
|
|
|
|
USE_I18N = True
|
|
|
|
|
|
|
|
USE_L10N = True
|
|
|
|
|
|
|
|
USE_TZ = True
|
|
|
|
|
|
|
|
|
|
|
|
# Static files (CSS, JavaScript, Images)
|
2017-12-18 06:28:03 +01:00
|
|
|
# https://docs.djangoproject.com/en/1.11/howto/static-files/
|
2017-03-20 07:38:44 +01:00
|
|
|
|
|
|
|
STATIC_URL = '/static/'
|
2017-12-28 12:32:42 +01:00
|
|
|
# static root needs to be defined in order to use collectstatic
|
|
|
|
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
|
2017-03-20 07:38:44 +01:00
|
|
|
|
|
|
|
# MEDIA_ROOT is where media uploads are stored.
|
|
|
|
# We set this to a directory to host file attachments created
|
|
|
|
# with tickets.
|
|
|
|
MEDIA_URL = '/media/'
|
|
|
|
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
|
|
|
|
|
|
|
# Fixtures
|
2017-12-18 06:28:03 +01:00
|
|
|
# https://docs.djangoproject.com/en/1.11/ref/settings/#std:setting-FIXTURE_DIRS
|
2017-03-20 07:38:44 +01:00
|
|
|
# - This is only necessary to make the demo project work, not needed for
|
|
|
|
# your own projects unless you make your own fixtures
|
|
|
|
FIXTURE_DIRS = [os.path.join(BASE_DIR, 'fixtures')]
|
2017-09-27 19:40:47 +02:00
|
|
|
|
|
|
|
try:
|
|
|
|
from .local_settings import *
|
|
|
|
except ImportError:
|
|
|
|
pass
|