initiating django package from a work in progress lib
This commit is contained in:
66
tests/settings.py
Normal file
66
tests/settings.py
Normal file
@ -0,0 +1,66 @@
|
||||
"""
|
||||
Django settings for testing django-courriel package.
|
||||
"""
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
SECRET_KEY = 'test-secret-key-for-django-courriel-testing-only'
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
# Application definition
|
||||
INSTALLED_APPS = [
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django_courriel',
|
||||
]
|
||||
|
||||
MIDDLEWARE = []
|
||||
|
||||
ROOT_URLCONF = ''
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/6.1/ref/settings/#databases
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': ':memory:',
|
||||
}
|
||||
}
|
||||
|
||||
# Internationalization
|
||||
USE_I18N = True
|
||||
USE_TZ = True
|
||||
|
||||
# Default primary key field type
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
||||
# Django templates
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [
|
||||
os.path.join(BASE_DIR, 'django_courriel', 'templates'),
|
||||
os.path.join(BASE_DIR, 'tests', 'templates'),
|
||||
],
|
||||
'APP_DIRS': True,
|
||||
'OPTIONS': {
|
||||
'context_processors': [],
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
# Markdown email settings
|
||||
MARKDOWN_EMAIL_EXTENSIONS = ['extra', 'nl2br']
|
||||
MARKDOWN_EMAIL_DEFAULT_LAYOUT = 'courriel/base.dj.html'
|
||||
|
||||
# Use in-memory storage for testing
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend'
|
||||
Reference in New Issue
Block a user