]>
git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/rest/app/settings.py
1 # Django settings for calamari project.
7 # ('Your Name', 'your_email@example.com'),
12 # No database, no problem!
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
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.
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'
32 # If you set this to False, Django will make some optimizations so as not
33 # to load the internationalization machinery.
36 # If you set this to False, Django will not format dates, numbers and
37 # calendars according to the current locale.
40 # If you set this to False, Django will not use timezone-aware datetimes.
43 # Absolute filesystem path to the directory that will hold user-uploaded files.
44 # Example: "/var/www/example.com/media/"
47 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
49 # Examples: "http://example.com/media/", "http://media.example.com/"
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')
61 # URL prefix for static files.
62 # Example: "http://example.com/static/", "http://static.example.com/"
63 STATIC_URL
= '/static/'
65 # Additional locations of static files
66 STATICFILES_DIRS
= tuple()
68 # List of finder classes that know how to find static files in
70 STATICFILES_FINDERS
= (
71 'django.contrib.staticfiles.finders.FileSystemFinder',
72 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
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
)
83 # List of callables that know how to import templates from various sources.
85 'django.template.loaders.filesystem.Loader',
86 'django.template.loaders.app_directories.Loader',
87 # 'django.template.loaders.eggs.Loader',
90 CSRF_COOKIE_NAME
= "XSRF-TOKEN"
91 SESSION_COOKIE_NAME
= "calamari_sessionid"
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',
103 ROOT_URLCONF
= 'rest.app.urls'
105 # Python dotted path to the WSGI application used by Django's runserver.
106 #WSGI_APPLICATION = 'rest.app.wsgi.application'
109 #'django.contrib.auth',
110 'django.contrib.contenttypes',
111 'django.contrib.sessions',
112 'django.contrib.sites',
113 'django.contrib.messages',
114 'django.contrib.staticfiles',
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.
130 #'DEFAULT_AUTHENTICATION_CLASSES': (
131 # 'rest.APIKeyAuthentication',
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',
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'