text: """
  Django settings for taskbuster project.
  
  Generated by 'django-admin startproject' using Django 1.9.4.
  
  For more information on this file, see
  https://docs.djangoproject.com/en/1.9/topics/settings/
  
  For the full list of settings and their values, see
  https://docs.djangoproject.com/en/1.9/ref/settings/
  """
  
  from django.core.exceptions import ImproperlyConfigured
  from django.utils.translation import ugettext_lazy as _ # for translation
  # note 'ugettext_lazy' translates only when rendering, while 'ugettext' translates straight away
  import os
  
  # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  # because we made a settings directory, we need to move this up a directory
  BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  #BASE_DIR = os.path.dirname(os.path.abspath(__file__))
  
  
  # Quick-start development settings - unsuitable for production
  # See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
  
  # SECURITY WARNING: keep the secret key used in production secret!
  #SECRET_KEY = 'some automatically generated long random string'
  # is now set in virtual env so not in version control
  def get_env_variable(var_name):
      try:
          return os.environ[var_name]
      except KeyError:
          error_msg = "Set the %s environment variable" % var_name
          raise ImproperlyConfigured(error_msg)
  
  SECRET_KEY = get_env_variable('SECRET_KEY')
  
  # SECURITY WARNING: don't run with debug turned on in production!
  #DEBUG = True # now in the development.py etc. depending on the situation
  
  ALLOWED_HOSTS = []
  
  
  # Application definition
  
  INSTALLED_APPS = [
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
  ]
  
  INSTALLED_APPS += (
      # The Django sites framework is required
      'django.contrib.sites',
      'allauth',
      'allauth.account',
      'allauth.socialaccount',
      # Login via Google
      'allauth.socialaccount.providers.google',
      # Login via Twitter
      'allauth.socialaccount.providers.twitter',
      # our taskmanager app:
      'taskbuster.apps.taskmanager',
  )
  
  SITE_ID = 2 # this depends on http://127.0.0.1:8000/en/admin/sites/site/
  # we started with example.com in there, I deleted that so our first site is actually no. 2
  
  MIDDLEWARE_CLASSES = [
      'django.middleware.security.SecurityMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.locale.LocaleMiddleware', # needs to be in this position (used for multi-language)
      'django.middleware.common.CommonMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
  ]
  
  ROOT_URLCONF = 'taskbuster.urls'
  
  # 'DIRS': [],
  TEMPLATES = [
      {
          'BACKEND': 'django.template.backends.django.DjangoTemplates',
          'DIRS': [os.path.join(BASE_DIR, "templates")],
          'APP_DIRS': True,
          'OPTIONS': {
              'context_processors': [
                  'django.template.context_processors.debug',
                  'django.template.context_processors.request',
                  'django.contrib.auth.context_processors.auth',
                  'django.contrib.messages.context_processors.messages',
                  'django.template.context_processors.i18n',
                  # Required by allauth template tags
                  "django.core.context_processors.request",
              ],
          },
      },
  ]
  #print("base dir", BASE_DIR)
  #print("template dir", TEMPLATES[0]["DIRS"])
  
  WSGI_APPLICATION = 'taskbuster.wsgi.application'
  
  
  # Database
  # https://docs.djangoproject.com/en/1.9/ref/settings/#databases
  # note : overwritten in testing and development with postgres settings
  DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.sqlite3',
          'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
      }
  }
  
  
  # Password validation
  # https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
  
  AUTH_PASSWORD_VALIDATORS = [
      {
          'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
      },
  ]
  
  AUTHENTICATION_BACKENDS = (
      # Default backend -- used to login by username in Django admin
      "django.contrib.auth.backends.ModelBackend",
      # `allauth` specific authentication methods, such as login by e-mail
      "allauth.account.auth_backends.AuthenticationBackend",
  )
  
  # Internationalization
  # https://docs.djangoproject.com/en/1.9/topics/i18n/
  
  LANGUAGE_CODE = 'en-us' # this will be the default
  
  LANGUAGES = (
      ('en', _('English')),
      ('ca', _('Catalan')),
  )
  # specify the 'locale' folder we added for translations
  LOCALE_PATHS = (
      os.path.join(BASE_DIR, 'locale'),
  )
  
  #TIME_ZONE = 'UTC'
  TIME_ZONE = 'Europe/Paris'
  
  USE_I18N = True
  
  USE_L10N = True # uses the locale settings to change date and time formats
  
  USE_TZ = True # uses timezone support, also recommended to have the package 'pytz'
  
  
  # Static files (CSS, JavaScript, Images)
  # https://docs.djangoproject.com/en/1.9/howto/static-files/
  
  STATIC_URL = '/static/'
  # Django will look for static dir in each app with the following
  STATICFILES_DIRS = (
      os.path.join(BASE_DIR, "static"),
  )
  
  ACCOUNT_USERNAME_REQUIRED = False
  ACCOUNT_EMAIL_VERIFICATION = "none"
  SOCIALACCOUNT_QUERY_EMAIL = True
  LOGIN_REDIRECT_URL = "/"