"django.middleware.locale.LocaleMiddleware",
    "django.middleware.common.CommonMiddleware",
    "django.middleware.csrf.CsrfViewMiddleware",
    "django.contrib.auth.middleware.AuthenticationMiddleware",
    "django.contrib.messages.middleware.MessageMiddleware",
    "django.middleware.clickjacking.XFrameOptionsMiddleware",
)

ROOT_URLCONF = "myproject.urls"

WSGI_APPLICATION = "myproject.wsgi.application"

TIME_ZONE = "UTC"
USE_I18N = True
USE_L10N = True
USE_TZ = True

LANGUAGE_CODE = "en"

LANGUAGES = (
    ("en", "English"),
    ("de", "Deutsch"),
    ("fr", "Français"),
    ("lt", "Lietuvių"),
)

from utils.misc import get_git_changeset
STATIC_URL = "/static/%s/" % get_git_changeset(PROJECT_PATH)

MEDIA_URL = "/media/"
)

TEMPLATE_DIRS = (
    os.path.join(BASE_DIR, "myproject", "templates"),
)

FILE_UPLOAD_TEMP_DIR = os.path.join(
    BASE_DIR, "myproject", "tmp"
)

sys.path =["", EXTERNAL_LIBS_PATH, EXTERNAL_APPS_PATH] + \
    sys.path

## necessary configure git in the project. 
from utils.misc import get_git_changeset 
STATIC_URL = "/static/%s/" % get_git_changeset(BASE_DIR)


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'u732!2pn4p8$fvh4+-y-=au@zx)*6niv=zeh+z-w7^ysejs5@p'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []


# Application definition
    "django.contrib.auth.middleware.AuthenticationMiddleware",
    "django.contrib.messages.middleware.MessageMiddleware",
    "django.middleware.clickjacking.XFrameOptionsMiddleware",
)

ROOT_URLCONF = "myproject.urls"

WSGI_APPLICATION = "myproject.wsgi.application"

LANGUAGE_CODE = "en-us"
TIME_ZONE = "UTC"
USE_I18N = True
USE_L10N = True
USE_TZ = True

from utils.misc import get_git_changeset
STATIC_URL = "/static/%s/" % get_git_changeset(PROJECT_PATH)

MEDIA_URL = "/media/"

CRISPY_TEMPLATE_PACK = "bootstrap3"

REST_FRAMEWORK = {
    "DEFAULT_PERMISSION_CLASSES":
    ["rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly"],
    "DEFAULT_PAGINATION_CLASS":
    "rest_framework.pagination.LimitOffsetPagination",
    "PAGE_SIZE":
    100,
}
Exemplo n.º 4
0
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
from __future__ import unicode_literals
import os

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# … somewhere after BASE_DIR definition …
# from utils.misc import get_media_svn_revision
# STATIC_URL = "/static/%s/" % get_media_svn_revision(BASE_DIR)

from utils.misc import get_git_changeset
STATIC_URL = "/static/%s/" % get_git_changeset(BASE_DIR)

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '8*md2t)o**67@*yhc(d=f@j95kl(dnf^rmm4s00$-mh_vurb2b'

# SECURITY WARNING: don't run with debug turned on in production!
#if you set Debug = fALSE, you also need to set the allowed_hosts
DEBUG = True

#This is a security measure to prevent HTTP Host header attacks,
#which are possible even under many seemingly-safe web server configurations.
ALLOWED_HOSTS = []
Exemplo n.º 5
0
LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'America/Los_Angeles'

USE_I18N = True

USE_L10N = True

USE_TZ = True

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.6/howto/static-files/

from utils.misc import get_git_changeset

STATIC_URL = '/static/%s/' % get_git_changeset(BASE_PATH)
print STATIC_URL

LOCALE_PATHS = (os.path.join(BASE_PATH, 'locale'), )

# Media files location - uploaded by users?
MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')

# Static files location
STATIC_ROOT = os.path.join(PROJECT_PATH, 'static')

# Static files (CSS, JavaScript, Images) served by the server ?
STATICFILES_DIRS = (os.path.join(PROJECT_PATH, 'site_static'), )

# Templates location
TEMPLATE_DIRS = (os.path.join(PROJECT_PATH, 'templates'), )
Exemplo n.º 6
0
TIME_ZONE = 'America/Los_Angeles'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.6/howto/static-files/

from utils.misc import get_git_changeset

STATIC_URL = '/static/%s/' % get_git_changeset(BASE_PATH)
print STATIC_URL

LOCALE_PATHS = (
    os.path.join(BASE_PATH, 'locale'),
)

# Media files location - uploaded by users?
MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')

# Static files location
STATIC_ROOT = os.path.join(PROJECT_PATH, 'static')

# Static files (CSS, JavaScript, Images) served by the server ?
STATICFILES_DIRS = (
    os.path.join(PROJECT_PATH, 'site_static'),