Just enough infrastructure to get tests to pass as standalone app
This commit is contained in:
parent
d3d8d5e46c
commit
ff49d5cba2
9 changed files with 307 additions and 5 deletions
64
test_settings.py
Normal file
64
test_settings.py
Normal file
|
@ -0,0 +1,64 @@
|
|||
import os
|
||||
|
||||
DEBUG = True,
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
||||
print("bd ", BASE_DIR)
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
}
|
||||
}
|
||||
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||
|
||||
# Document
|
||||
TODO_STAFF_ONLY = False
|
||||
TODO_DEFAULT_LIST_ID = None
|
||||
TODO_DEFAULT_ASSIGNEE = None
|
||||
TODO_PUBLIC_SUBMIT_REDIRECT = '/'
|
||||
|
||||
SECRET_KEY = "LKFSD8sdl.,8&sdf--"
|
||||
|
||||
SITE_ID = 1
|
||||
|
||||
INSTALLED_APPS = (
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.sites',
|
||||
'django.contrib.staticfiles',
|
||||
'todo',
|
||||
)
|
||||
|
||||
ROOT_URLCONF = 'base_urls'
|
||||
|
||||
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',
|
||||
]
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [os.path.join(BASE_DIR, 'todo', 'templates'), ],
|
||||
'APP_DIRS': True,
|
||||
'OPTIONS': {
|
||||
'context_processors': [
|
||||
'django.template.context_processors.debug',
|
||||
'django.template.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.template.context_processors.media',
|
||||
'django.template.context_processors.static',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
# Your stuff: custom template context processors go here
|
||||
],
|
||||
},
|
||||
},
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue