No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

settings.py.template 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # Django settings for k4ever project.
  2. from settings_default import *
  3. # Debug settings
  4. DEBUG = True
  5. TEMPLATE_DEBUG = DEBUG
  6. PISTON_DISPLAY_ERRORS = DEBUG
  7. DEBUG_PROPOGATE_EXCEPTIONS = DEBUG
  8. # When DEBUG = False, exceptions will be mailed to these people
  9. ADMINS = (
  10. # ('Your Name', 'your_email@domain.com'),
  11. )
  12. MANAGERS = ADMINS
  13. DATABASES = {
  14. 'default': {
  15. 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
  16. 'NAME': 'k4ever.db', # Or path to database file if using sqlite3.
  17. 'USER': '', # Not used with sqlite3.
  18. 'PASSWORD': '', # Not used with sqlite3.
  19. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
  20. 'PORT': '', # Set to empty string for default. Not used with sqlite3.
  21. }
  22. }
  23. # Local time zone for this installation. Choices can be found here:
  24. # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
  25. # although not all choices may be available on all operating systems.
  26. # On Unix systems, a value of None will cause Django to use the same
  27. # timezone as the operating system.
  28. # If running in a Windows environment this must be set to the same as your
  29. # system time zone.
  30. TIME_ZONE = 'Europe/Berlin'
  31. # Language code for this installation. All choices can be found here:
  32. # http://www.i18nguy.com/unicode/language-identifiers.html
  33. LANGUAGE_CODE = 'de-de'
  34. # Make this unique, and don't share it with anybody. This is used for hash
  35. # generation and other stuff. MUST BE SET.
  36. SECRET_KEY = ''
  37. # LDAP configuration
  38. USE_LDAP = False
  39. if USE_LDAP:
  40. # For more information about the LDAP backend look the docs for
  41. # django-auth-ldap - http://packages.python.org/django-auth-ldap/
  42. AUTH_LDAP_SERVER_URI = 'ldaps://your.server'
  43. AUTH_LDAP_START_TLS = False
  44. AUTH_LDAP_USER_DN_TEMPLATE = "uid=%(user)s,ou=users,dc=example,dc=com"
  45. AUTH_LDAP_USER_ATTR_MAP = {
  46. "first_name": "givenName",
  47. "last_name": "sn",
  48. "email": "mail"
  49. }
  50. ## Uncomment these lines, if the certificate of your ldap(s) is not in
  51. ## your local certificate store (e.g. /etc/ssl/)
  52. # import ldap
  53. #AUTH_LDAP_GLOBAL_OPTIONS = {ldap.OPT_X_TLS_CACERTFILE: "data/cacert.txt"}
  54. ## Uncomment this, if you want ldap privileges mapped onto django's
  55. #AUTH_LDAP_USER_FLAGS_BY_GROUP = {
  56. ## "is_active": "cn=active,ou=groups,dc=example,dc=com",
  57. # "is_staff": "cn=staff,ou=groups,dc=example,dc=com",
  58. # "is_superuser": "cn=superuser,ou=groups,dc=example,dc=com"
  59. #}
  60. # Add LDAP to authentication backends (needs to be first in the list)
  61. AUTHENTICATION_BACKENDS = ('django_auth_ldap.backend.LDAPBackend',) \
  62. + AUTHENTICATION_BACKENDS
  63. if not SECRET_KEY or SECRET_KEY == '':
  64. from django.core.exceptions import ImproperlyConfigured
  65. raise ImproperlyConfigured("Please set a SECRET_KEY in your settings.py")