Esempio n. 1
0
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT = os.path.join(ROOT_PATH, '../uploads/')

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
MEDIA_URL = '/uploads/'

# Get SECRET_KEY from a separate file; create a new random key if it doesn't exist.
try:
    from secret_key import *
except ImportError:
    from keygen import generate_secret_key
    generate_secret_key(os.path.join(ROOT_PATH, 'settings', 'secret_key.py'))
    from secret_key import *

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
    'django.template.loaders.eggs.Loader',
)

TEMPLATE_DIRS = (
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
    os.path.join(ROOT_PATH, 'templates'), )
Esempio n. 2
0
# Django settings for tweed project.

import os
from keygen import generate_secret_key
# Generate SECRET_KEY
try:
    from secret_key import *
except ImportError:
    SETTINGS_DIR = os.path.abspath(os.path.dirname(__file__))
    generate_secret_key(os.path.join(SETTINGS_DIR, 'secret_key.py'))
    from secret_key import *

# Turn this off in produciton
DEBUG = True
TEMPLATE_DEBUG = DEBUG

# Need to define in production
ALLOWED_HOSTS = ['127.0.0.1', 'www.example.com',]

ADMINS = (
    #('admin name', 'admin e-mail'),
)

MANAGERS = ADMINS

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': '',                      # Or path to database file if using sqlite3.
        # The following settings are not used with sqlite3:
        'USER': '',
Esempio n. 3
0
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT = os.path.join(ROOT_PATH, '../uploads/')

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
MEDIA_URL = '/uploads/'

# Get SECRET_KEY from a separate file; create a new random key if it doesn't exist.
try:
    from secret_key import *
except ImportError:
    from keygen import generate_secret_key
    generate_secret_key(os.path.join(ROOT_PATH, 'settings', 'secret_key.py'))
    from secret_key import *

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
    'django.template.loaders.eggs.Loader',
)

TEMPLATE_DIRS = (
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
    os.path.join(ROOT_PATH, 'templates'),
)
Esempio n. 4
0
# Django settings for tweed project.

import os
from keygen import generate_secret_key
# Generate SECRET_KEY
try:
    from secret_key import *
except ImportError:
    SETTINGS_DIR = os.path.abspath(os.path.dirname(__file__))
    generate_secret_key(os.path.join(SETTINGS_DIR, 'secret_key.py'))
    from secret_key import *

# Turn this off in produciton
DEBUG = True
TEMPLATE_DEBUG = DEBUG

# Need to define in production
ALLOWED_HOSTS = [
    '127.0.0.1',
    'www.example.com',
]

ADMINS = (
    #('admin name', 'admin e-mail'),
)

MANAGERS = ADMINS

DATABASES = {
    'default': {
        'ENGINE':