import os import django BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'not-a-secret' DEBUG = True ALLOWED_HOSTS = [] SITE_ID = 1 EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.staticfiles', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.contenttypes', 'simplekeys', ] SIMPLEKEYS_RATE_LIMIT_BACKEND = 'simplekeys.backends.MemoryBackend' SIMPLEKEYS_ZONE_PATHS = [('/via.*/', 'default')] _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', 'simplekeys.middleware.SimpleKeysMiddleware', ] if django.VERSION >= (1, 11): MIDDLEWARE = _MIDDLEWARE else: MIDDLEWARE_CLASSES = _MIDDLEWARE ROOT_URLCONF = 'simplekeys.tests.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'example.wsgi.application' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True STATIC_URL = '/static/'