Exemple #1
0
def test_is_truthy(value, expected):
    assert util.is_truthy(value) is expected
Exemple #2
0
import sys
import uuid
from os.path import abspath
from os.path import dirname
from os.path import join

import dj_database_url
from django.urls import reverse_lazy

from common.util import is_truthy

# Name of the deployment environment (dev/alpha)
ENV = os.environ.get("ENV", "dev")

# Global variables
SSO_ENABLED = is_truthy(os.environ.get("SSO_ENABLED", "true"))
VCAP_SERVICES = json.loads(os.environ.get("VCAP_SERVICES", "{}"))

# -- Paths

# Name of the project
PROJECT_NAME = "tamato"

# Absolute path of project Django directory
BASE_DIR = dirname(dirname(abspath(__file__)))

# Directory to collect static files into
STATIC_ROOT = join(BASE_DIR, "run", "static")

# Directory for user uploaded files
MEDIA_ROOT = join(BASE_DIR, "run", "uploads")