Debian Codegraph @

debian/tests/settings_spatialite.py

raw
1 import os
2
3 TEST_PERFORMANCE = False
4
5 DEBUG = True
6 TEMPLATE_DEBUG = DEBUG
7
8 DATABASES = {
9 'default': {
10 'ENGINE': 'django.contrib.gis.db.backends.spatialite',
11 'NAME': 'test.db',
12 },
13 }
14
15 # Support mod_spatialite:
16 # https://code.djangoproject.com/ticket/23901
17 SPATIALITE_LIBRARY_PATH = 'mod_spatialite.so'
18
19 DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
20
21 SECRET_KEY = 'fn)t*+$)ugeyip6-#txyy$5wf2ervc0d2n#h)qb)y5@ly$t*@w'
22
23 INSTALLED_APPS = (
24 'django.contrib.auth',
25 'django.contrib.contenttypes',
26 'django.contrib.sessions',
27 'django.contrib.messages',
28 'django.contrib.staticfiles',
29 'django.contrib.admin',
30 'django.contrib.gis',
31 # rest framework
32 'rest_framework',
33 'rest_framework_gis',
34 # test app
35 'django_restframework_gis_tests',
36 )
37
38 MIDDLEWARE = [
39 'django.contrib.sessions.middleware.SessionMiddleware',
40 'django.middleware.common.CommonMiddleware',
41 'django.middleware.csrf.CsrfViewMiddleware',
42 'django.contrib.auth.middleware.AuthenticationMiddleware',
43 'django.contrib.messages.middleware.MessageMiddleware',
44 'django.middleware.clickjacking.XFrameOptionsMiddleware',
45 ]
46
47 TEMPLATES = [
48 {
49 'BACKEND': 'django.template.backends.django.DjangoTemplates',
50 'DIRS': [],
51 'APP_DIRS': True,
52 'OPTIONS': {
53 'context_processors': [
54 'django.template.context_processors.debug',
55 'django.template.context_processors.request',
56 'django.contrib.auth.context_processors.auth',
57 'django.contrib.messages.context_processors.messages',
58 ],
59 },
60 },
61 ]
62
63 ROOT_URLCONF = 'urls'
64
65 TIME_ZONE = 'Europe/Rome'
66 LANGUAGE_CODE = 'en-gb'
67 USE_TZ = True
68 USE_I18N = False
69 SITE_ROOT = os.path.dirname(os.path.realpath(__file__))
70 MEDIA_ROOT = '%s/media/' % SITE_ROOT
71 MEDIA_URL = '/media/'
72 STATIC_ROOT = '%s/static/' % SITE_ROOT
73 STATIC_URL = '/static/'
74
75 TEMPLATE_STRING_IF_INVALID = 'INVALID_TEMPLATE: %s END_INVALID_TEMPLATE'
76
77 REST_FRAMEWORK = {
78 'DEFAULT_SCHEMA_CLASS': 'rest_framework_gis.schema.GeoFeatureAutoSchema',
79 }
80
81 # local settings must be imported before test runner otherwise they'll be ignored
82 try:
83 from local_settings import *
84 except ImportError:
85 pass