1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-27 20:23:45 +00:00
scrapy/sites/scrapy.org/site/settings.py
Matias Aguirre 468c0d38fa Django site project. Apps installed:
* Article
      This is a simple "article" application with ReST support. Instances could
      be marked as "main" and a templatetag retrieve them.

    * Blog
      Django blog application, needs a better integration yet.

    * Download
      Little application to manage "download" links

    * Link
      Little application to manage links (like those displayed on top and in the
      footer)

--HG--
extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%403
2008-06-26 14:36:58 +00:00

102 lines
3.1 KiB
Python

# -*- coding: utf-8 -*-
# Django settings for scrapy project.
from os.path import abspath, dirname, basename, join
import sys
PROJECT_ABSOLUTE_DIR = dirname(abspath(__file__))
PROJECT_NAME = basename(PROJECT_ABSOLUTE_DIR)
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DEFAULT_CHARSET = "utf-8"
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be avilable on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'America/Montevideo'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
# USE_I18N = True
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = join(PROJECT_ABSOLUTE_DIR, "static")
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = '/site-media'
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/media/'
# Make this unique, and don't share it with anybody.
SECRET_KEY = 'fq04ss$#1h=m=39sh4vvph+76i5u716z1-x5$$9xn7sb6y4-di'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
# 'django.template.loaders.eggs.load_template_source',
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware',
#'%s.middleware.threadlocals.ThreadLocals' % PROJECT_NAME,
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
)
ROOT_URLCONF = '%s.urls' % PROJECT_NAME
TEMPLATE_DIRS = (
join(PROJECT_ABSOLUTE_DIR, "templates"),
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.markup',
'django.contrib.flatpages',
'link',
'article',
'download',
'blog',
)
# Add apps/ dir to python path.
sys.path.append(join(PROJECT_ABSOLUTE_DIR, "apps"))
# Override previous settings with values in local_settings.py settings file.
try:
from local_settings import *
except ImportError:
debug_msg ="Can't find local_settings.py, using default settings."
try:
from mod_python import apache
apache.log_error("%s" % debug_msg, apache.APLOG_NOTICE)
except ImportError:
import sys
sys.stderr.write("%s\n" % debug_msg)