# Django settings for pydocweb project.

DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (
    # ('Your Name', 'your_email@domain.com'),
)

SVN_DIRS = ("/home/pauli/koodi/proj/numpy-doc/numpydoc_pauli/numpy",
            )#"/home/pauli/koodi/proj/numpy-doc/numpydoc_pauli/scipy")
MODULES = ("numpy",)# "scipy")
ADDNEWDOCS_FILES = (
    SVN_DIRS[0] + "/numpy/add_newdocs.py",
    SVN_DIRS[0] + "/numpy/core/code_generators/docstrings.py",
)
PYREX_FILES = (
    SVN_DIRS[0] + "/numpy/random/mtrand/mtrand.pyx:numpy.random.mtrand",
)
PYDOCMOIN = "/home/pauli/koodi/proj/numpy-doc/numpydoc_pauli/pydoc_moin.py"

MAX_DOCSTRING_WIDTH = 79

#------------------------------------------------------------------------------

MANAGERS = ADMINS

DATABASE_ENGINE = 'sqlite3'  # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
DATABASE_NAME = 'data.db'      # Or path to database file if using sqlite3.
DATABASE_USER = ''             # Not used with sqlite3.
DATABASE_PASSWORD = ''         # Not used with sqlite3.
DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.

# Local time zone for this installation. Choices can be found here:
# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
# although not all variations may be possible on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'Europe/Helsinki'

# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
# http://blogs.law.harvard.edu/tech/stories/storyReader$15
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 = '/home/pauli/koodi/proj/numpy-doc/numpydoc_pauli/pydocweb/media/'
MATH_ROOT = MEDIA_ROOT + "math/"

# URL that handles the media served from MEDIA_ROOT.
# Example: "http://media.lawrence.com"
MEDIA_URL = '/site_media'
MATH_URL = MEDIA_URL + '/math/'

# 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 = '2@_(dq4n9tt86zo&vlx1*-x@=p95no8cgthr+-f)3he*)i)1r2'

# 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',
)

TEMPLATE_CONTEXT_PROCESSORS = (
    "django.core.context_processors.auth",
    "django.core.context_processors.debug",
    "django.core.context_processors.i18n",
    "pydocweb.doc.context_processors.media_url",
)

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.csrf.middleware.CsrfMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.middleware.doc.XViewMiddleware',
)

ROOT_URLCONF = 'pydocweb.urls'

import os

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.abspath(os.path.join(os.path.dirname(__file__), "templates")),
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.admin',
    'pydocweb.doc',
)

@@ -131,16 +131,165 @@
 m'),%0A)%0A%0A
+import os%0Adef relative_dir(path):%0A    return os.path.abspath(os.path.join(os.path.dirname(__file__),%0A                                        path))%0A%0A
 SVN_DIRS
@@ -687,56 +687,24 @@
 N = 
-%22/home/pauli/koodi/proj/numpy-doc/numpydoc_pauli
+relative_dir(%22..
 /pyd
@@ -714,16 +714,17 @@
 moin.py%22
+)
 %0A%0AMAX_DO
@@ -2157,73 +2157,29 @@
 T = 
-'/home/pauli/koodi/proj/numpy-doc/numpydoc_pauli/pydocweb/
+relative_dir('
 media
-/
 '
+)
 %0AMAT
@@ -2191,28 +2191,76 @@
 T = 
-MEDIA_ROOT + %22math/%22
+relative_dir('media/math')%0AIMAGE_ROOT = relative_dir('media/images')
 %0A%0A# 
@@ -3541,19 +3541,8 @@
 s'%0A%0A
-import os%0A%0A
 TEMP
@@ -3765,64 +3765,21 @@
     
-os.path.abspath(os.path.join(os.path.dirname(__file__), 
+relative_dir(
 %22tem
@@ -3786,17 +3786,16 @@
 plates%22)
-)
 ,%0A)%0A%0AINS

Use relative path-names.