File: __init__.py

package info (click to toggle)
python-django-etcd-settings 0.1.13%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 320 kB
  • sloc: python: 925; makefile: 210
file content (25 lines) | stat: -rw-r--r-- 732 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import django
from django.conf import global_settings, settings

settings.configure(
    # Minimal django settings
    DATABASES={
        'default': {
            'ENGINE': 'django.db.backends.sqlite3',
            'NAME': 'unittest.sqlite',
            'TEST_NAME': ':memory:',
        },
    },
    MIDDLEWARE_CLASSES=global_settings.MIDDLEWARE_CLASSES,
    ROOT_URLCONF=None,
    INSTALLED_APPS=['etcd_settings'],
    DJES_DEV_PARAMS=None,
    DJES_REQUEST_GETTER=None,
    DJES_ENV='dev',
    DJES_ETCD_DETAILS=None,
    DJES_WSGI_FILE=None
    # DJES_ETCD_DETAILS=dict(host='localhost', port=4000, protocol='http',
    #                        prefix='/config/my-django-app')
)
if hasattr(django, 'setup'):
    django.setup()