Graphs and tables for your Spotify account.
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.

149 lines
3.8 KiB

  1. """
  2. Django settings for musicdata project.
  3. Generated by 'django-admin startproject' using Django 2.0.5.
  4. For more information on this file, see
  5. https://docs.djangoproject.com/en/2.0/topics/settings/
  6. For the full list of settings and their values, see
  7. https://docs.djangoproject.com/en/2.0/ref/settings/
  8. """
  9. import os
  10. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  11. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  12. # Quick-start development settings - unsuitable for production
  13. # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
  14. # SECURITY WARNING: keep the secret key used in production secret!
  15. SECRET_KEY = 'm(gh1&063)haj#^t+h-qh@o6#%w=ruqi_#=6yzi=#@q6#0p*gv'
  16. # SECURITY WARNING: don't run with debug turned on in production!
  17. DEBUG = True
  18. ALLOWED_HOSTS = []
  19. # Application definition
  20. INSTALLED_APPS = [
  21. 'django.contrib.admin',
  22. 'django.contrib.auth',
  23. 'django.contrib.contenttypes',
  24. 'django.contrib.sessions',
  25. 'django.contrib.messages',
  26. 'django.contrib.staticfiles',
  27. 'login.apps.LoginConfig',
  28. 'api.apps.ApiConfig',
  29. 'graphs.apps.GraphsConfig',
  30. 'django_tables2',
  31. 'django_filters',
  32. 'sass_processor',
  33. 'crispy_forms',
  34. ]
  35. CRISPY_TEMPLATE_PACK = 'bootstrap4'
  36. MIDDLEWARE = [
  37. 'django.middleware.security.SecurityMiddleware',
  38. 'django.contrib.sessions.middleware.SessionMiddleware',
  39. 'django.middleware.common.CommonMiddleware',
  40. 'django.middleware.csrf.CsrfViewMiddleware',
  41. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  42. 'django.contrib.messages.middleware.MessageMiddleware',
  43. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  44. ]
  45. ROOT_URLCONF = 'spotifyvis.urls'
  46. TEMPLATES = [
  47. {
  48. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  49. 'DIRS': [],
  50. 'APP_DIRS': True,
  51. 'OPTIONS': {
  52. 'context_processors': [
  53. 'django.template.context_processors.debug',
  54. 'django.template.context_processors.request',
  55. 'django.contrib.auth.context_processors.auth',
  56. 'django.contrib.messages.context_processors.messages',
  57. ],
  58. },
  59. },
  60. ]
  61. WSGI_APPLICATION = 'spotifyvis.wsgi.application'
  62. # Database
  63. # https://docs.djangoproject.com/en/2.0/ref/settings/#databases
  64. DATABASES = {
  65. 'default': {
  66. 'ENGINE': 'django.db.backends.postgresql_psycopg2',
  67. 'NAME': 'spotifyvis',
  68. 'USER': 'django',
  69. 'PASSWORD': 'django',
  70. 'HOST': 'localhost',
  71. 'PORT': '',
  72. }
  73. }
  74. # Password validation
  75. # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
  76. AUTH_PASSWORD_VALIDATORS = [
  77. {
  78. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  79. },
  80. {
  81. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  82. },
  83. {
  84. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  85. },
  86. {
  87. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  88. },
  89. ]
  90. # Internationalization
  91. # https://docs.djangoproject.com/en/2.0/topics/i18n/
  92. LANGUAGE_CODE = 'en-us'
  93. TIME_ZONE = 'America/Toronto'
  94. USE_I18N = True
  95. USE_L10N = True
  96. USE_TZ = True
  97. # Static files (CSS, JavaScript, Images)
  98. # https://docs.djangoproject.com/en/2.0/howto/static-files/
  99. STATIC_URL = '/static/'
  100. STATIC_ROOT = os.path.join(BASE_DIR, "spotifyvis/static")
  101. STATICFILES_DIRS = [
  102. os.path.join(BASE_DIR, "static/"),
  103. ]
  104. STATICFILES_FINDERS = [
  105. 'django.contrib.staticfiles.finders.FileSystemFinder',
  106. 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
  107. 'sass_processor.finders.CssFinder',
  108. ]
  109. SASS_PROCESSOR_ROOT = STATIC_ROOT
  110. SASS_PROCESSOR_INCLUDE_DIRS = [
  111. os.path.join(STATICFILES_DIRS[0], "scss/bootstrap"),
  112. ]
  113. MEDIA_URL = '/media/'
  114. MEDIA_ROOT = os.path.join(BASE_DIR, 'media')