settings-sample.py 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. # Django settings for usic project.
  2. DEBUG = True
  3. TEMPLATE_DEBUG = DEBUG
  4. ADMINS = (
  5. # ('Your Name', 'your_email@domain.com'),
  6. )
  7. MANAGERS = ADMINS
  8. DATABASES = {
  9. 'default': {
  10. 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
  11. 'NAME': 'dlms', # Or path to database file if using sqlite3.
  12. 'USER': 'dlms', # Not used with sqlite3.
  13. 'PASSWORD': '7mAr1N@', # Not used with sqlite3.
  14. 'HOST': 'localhost', # Set to empty string for localhost. Not used with sqlite3.
  15. 'PORT': '', # Set to empty string for default. Not used with sqlite3.
  16. }
  17. }
  18. # Local time zone for this installation. Choices can be found here:
  19. # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
  20. # although not all choices may be available on all operating systems.
  21. # On Unix systems, a value of None will cause Django to use the same
  22. # timezone as the operating system.
  23. # If running in a Windows environment this must be set to the same as your
  24. # system time zone.
  25. TIME_ZONE = 'Europe/Kiev'
  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. SITE_ID = 1
  30. # If you set this to False, Django will make some optimizations so as not
  31. # to load the internationalization machinery.
  32. USE_I18N = True
  33. # If you set this to False, Django will not format dates, numbers and
  34. # calendars according to the current locale
  35. USE_L10N = True
  36. # Absolute path to the directory that holds media.
  37. # Example: "/home/media/media.lawrence.com/"
  38. MEDIA_ROOT = ''
  39. # URL that handles the media served from MEDIA_ROOT. Make sure to use a
  40. # trailing slash if there is a path component (optional in other cases).
  41. # Examples: "http://media.lawrence.com", "http://example.com/media/"
  42. MEDIA_URL = ''
  43. # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
  44. # trailing slash.
  45. # Examples: "http://foo.com/media/", "/media/".
  46. ADMIN_MEDIA_PREFIX = '/media/'
  47. # Make this unique, and don't share it with anybody.
  48. SECRET_KEY = '8jr^p&c)m(3f2v9d_8lr_6!jfd302aj8s#^0#&+#v$_gb^y^rr'
  49. # List of callables that know how to import templates from various sources.
  50. TEMPLATE_LOADERS = (
  51. 'django.template.loaders.filesystem.Loader',
  52. 'django.template.loaders.app_directories.Loader',
  53. # 'django.template.loaders.eggs.Loader',
  54. )
  55. MIDDLEWARE_CLASSES = (
  56. 'django.middleware.common.CommonMiddleware',
  57. 'django.contrib.sessions.middleware.SessionMiddleware',
  58. # 'django.middleware.csrf.CsrfViewMiddleware',
  59. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  60. 'django.contrib.messages.middleware.MessageMiddleware',
  61. )
  62. ROOT_URLCONF = 'urls'
  63. TEMPLATE_DIRS = (
  64. '/var/www/usic/templates/'
  65. # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
  66. # Always use forward slashes, even on Windows.
  67. # Don't forget to use absolute paths, not relative paths.
  68. )
  69. INSTALLED_APPS = (
  70. 'django.contrib.auth',
  71. 'django.contrib.contenttypes',
  72. 'django.contrib.sessions',
  73. 'django.contrib.sites',
  74. 'django.contrib.messages',
  75. 'dlms',
  76. # Uncomment the next line to enable the admin:
  77. # 'django.contrib.admin',
  78. # Uncomment the next line to enable admin documentation:
  79. # 'django.contrib.admindocs',
  80. )
  81. AUTHENTICATION_BACKENDS = (
  82. 'dlms.backends.UMSBackend',
  83. )
  84. LOGIN_URL='/dlms/login/'
  85. #GLOBAL_DOWNLOAD_DIR = '/home/oksamyt/public_html/dlms_downloads'
  86. GLOBAL_DOWNLOAD_DIR = '/var/www/dlms_downloads'
  87. TRANSMISSION_SETTINGS = {
  88. 'host': 'localhost',
  89. 'port': 9091,
  90. 'user': 'transmission',
  91. 'password': 'testhash'
  92. }