]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/rest/app/settings.py
bump version to 12.0.3-pve3
[ceph.git] / ceph / src / pybind / mgr / rest / app / settings.py
1 # Django settings for calamari project.
2
3 DEBUG = False
4 TEMPLATE_DEBUG = DEBUG
5
6 ADMINS = (
7 # ('Your Name', 'your_email@example.com'),
8 )
9
10 MANAGERS = ADMINS
11
12 # No database, no problem!
13 DATABASES = {
14 }
15
16 # Hosts/domain names that are valid for this site; required if DEBUG is False
17 # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
18 ALLOWED_HOSTS = ['*']
19
20 # Local time zone for this installation. Choices can be found here:
21 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
22 # although not all choices may be available on all operating systems.
23 # In a Windows environment this must be set to your system time zone.
24 TIME_ZONE = None
25
26 # Language code for this installation. All choices can be found here:
27 # http://www.i18nguy.com/unicode/language-identifiers.html
28 LANGUAGE_CODE = 'en-us'
29
30 SITE_ID = 1
31
32 # If you set this to False, Django will make some optimizations so as not
33 # to load the internationalization machinery.
34 USE_I18N = True
35
36 # If you set this to False, Django will not format dates, numbers and
37 # calendars according to the current locale.
38 USE_L10N = True
39
40 # If you set this to False, Django will not use timezone-aware datetimes.
41 USE_TZ = True
42
43 # Absolute filesystem path to the directory that will hold user-uploaded files.
44 # Example: "/var/www/example.com/media/"
45 MEDIA_ROOT = ''
46
47 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
48 # trailing slash.
49 # Examples: "http://example.com/media/", "http://media.example.com/"
50 MEDIA_URL = ''
51
52 APPEND_SLASH = False
53
54 # Absolute path to the directory static files should be collected to.
55 # Don't put anything in this directory yourself; store your static files
56 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
57 # Example: "/var/www/example.com/static/"
58 #STATIC_ROOT = config.get('calamari_web', 'static_root')
59 STATIC_ROOT = None
60
61 # URL prefix for static files.
62 # Example: "http://example.com/static/", "http://static.example.com/"
63 STATIC_URL = '/static/'
64
65 # Additional locations of static files
66 STATICFILES_DIRS = tuple()
67
68 # List of finder classes that know how to find static files in
69 # various locations.
70 STATICFILES_FINDERS = (
71 'django.contrib.staticfiles.finders.FileSystemFinder',
72 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
73 )
74
75 # Generate at runtime, because we're not persisting anything we can
76 # change SECRET_KEY every time we load.
77 from django.utils.crypto import get_random_string
78 chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'
79 SECRET_KEY = get_random_string(50, chars)
80
81 LOGIN_URL = '/login/'
82
83 # List of callables that know how to import templates from various sources.
84 TEMPLATE_LOADERS = (
85 'django.template.loaders.filesystem.Loader',
86 'django.template.loaders.app_directories.Loader',
87 # 'django.template.loaders.eggs.Loader',
88 )
89
90 CSRF_COOKIE_NAME = "XSRF-TOKEN"
91 SESSION_COOKIE_NAME = "calamari_sessionid"
92
93 MIDDLEWARE_CLASSES = (
94 'django.middleware.common.CommonMiddleware',
95 'django.contrib.sessions.middleware.SessionMiddleware',
96 #'django.middleware.csrf.CsrfViewMiddleware',
97 #'django.contrib.auth.middleware.AuthenticationMiddleware',
98 'django.contrib.messages.middleware.MessageMiddleware',
99 # Uncomment the next line for simple clickjacking protection:
100 # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
101 )
102
103 ROOT_URLCONF = 'rest.app.urls'
104
105 # Python dotted path to the WSGI application used by Django's runserver.
106 #WSGI_APPLICATION = 'rest.app.wsgi.application'
107
108 INSTALLED_APPS = (
109 #'django.contrib.auth',
110 'django.contrib.contenttypes',
111 'django.contrib.sessions',
112 'django.contrib.sites',
113 'django.contrib.messages',
114 'django.contrib.staticfiles',
115 'rest_framework',
116 'rest.app'
117 )
118
119 # A sample logging configuration. The only tangible logging
120 # performed by this configuration is to send an email to
121 # the site admins on every HTTP 500 error when DEBUG=False.
122 # See http://docs.djangoproject.com/en/dev/topics/logging for
123 # more details on how to customize your logging configuration.
124 LOGGING = {
125
126 }
127
128
129 REST_FRAMEWORK = {
130 #'DEFAULT_AUTHENTICATION_CLASSES': (
131 # 'rest.APIKeyAuthentication',
132 #),
133
134 # Use hyperlinked styles by default.
135 # Only used if the `serializer_class` attribute is not set on a view.
136 'DEFAULT_MODEL_SERIALIZER_CLASS':
137 'rest_framework.serializers.HyperlinkedModelSerializer',
138
139 # Use Django's standard `django.contrib.auth` permissions,
140 # or allow read-only access for unauthenticated users.
141 #'DEFAULT_PERMISSION_CLASSES': [
142 # 'rest_framework.permissions.IsAuthenticated'
143 #]
144 }
145
146