settings.py:
# Django settings for satchmo project.
# If you have an existing project, then ensure that you modify
local_settings-customize.py
# and import it from your main settings file. (from local_settings
import *)
import os

DIRNAME = os.path.abspath(os.path.dirname(__file__).decode('utf-8'))

DJANGO_PROJECT = 'satchmo_store'
DJANGO_SETTINGS_MODULE = 'satchmo_store.settings'

LOCAL_DEV = True
DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (
     ('', ''),
)

MANAGERS = ADMINS

DATABASE_ENGINE = 'mysql'           # 'postgresql_psycopg2',
'postgresql', 'mysql', 'sqlite3' or 'oracle'.
# The following variables should be configured in your
local_settings.py file
#DATABASE_NAME = ''             # 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. All choices can be found
here:
# 
http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
TIME_ZONE = 'America/Chicago'

# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
# For windows, you must use 'us' instead
LANGUAGE_CODE = 'us'

SITE_ID = 1

# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
# Image files will be stored off of this path.
MEDIA_ROOT = os.path.join(DIRNAME, 'static/')
# URL that handles the media served from MEDIA_ROOT. Use a trailing
slash.
# Example: "http://media.lawrence.com/";
MEDIA_URL = '/static/'
# URL that handles the media served from SSL.  You only need to set
this
# if you are using a non-relative url.
# Example: "https://media.lawrence.com";
# MEDIA_SECURE_URL = "https://foo.com/";
# 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 = ''

# 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.middleware.locale.LocaleMiddleware",
    "django.contrib.auth.middleware.AuthenticationMiddleware",
    "django.middleware.doc.XViewMiddleware",
    "threaded_multihost.middleware.ThreadLocalMiddleware",
    "satchmo_store.shop.SSLMiddleware.SSLRedirect",
#    "satchmo_ext.recentlist.middleware.RecentProductMiddleware",
)

#this is used to add additional config variables to each request
# NOTE: If you enable the recent_products context_processor, you MUST
have the
# 'satchmo_ext.recentlist' app installed.
TEMPLATE_CONTEXT_PROCESSORS = (
    'django.core.context_processors.auth',
    'django.core.context_processors.media',
#    'satchmo_ext.recentlist.context_processors.recent_products',
    'satchmo_store.shop.context_processors.settings',
    'django.core.context_processors.i18n'
)

ROOT_URLCONF = 'mystore.site.urls'

TEMPLATE_DIRS = (
    # Put strings here, like "/home/html/django_templates".
    # Always use forward slashes, even on Windows.
    os.path.join(DIRNAME, "templates"),
)

INSTALLED_APPS = (
    'satchmo_store.shop',
    'django.contrib.admin',
    'django.contrib.admindocs',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.comments',
    'django.contrib.sessions',
    'django.contrib.sitemaps',
    'django.contrib.sites',
    #'registration',
    'sorl.thumbnail',
    'satchmo_store',
    'keyedcache',
    'livesettings',
    'satchmo_store.contact',
    'product',
    # ****
    # * Optional feature, product brands
    # * Uncomment below, and add the brand url in your satchmo_urls
setting
    # * usually in local_settings.py
    # ****
    #'satchmo_ext.brand'
    'shipping',
    'payment',
    'payment.modules.giftcertificate',
    'satchmo_store.contact.supplier',
    'satchmo_utils',
    'satchmo_utils.thumbnail',
    'l10n',
    'tax',
#    'satchmo_ext.recentlist',
    'satchmo_ext.wishlist',
    'satchmo_ext.upsell',
    'satchmo_ext.productratings',
    'app_plugins',
    # ****
    # * Optional Feature, Tiered shipping
    # * uncomment below to make that shipping module available in your
live site
    # * settings page. enable it there, then configure it in the
    # * admin/tiered section of the main admin page.
    # ****
    #'shipping.modules.tiered'
    # ****
    # * Optional feature newsletter
    # ****
    #'satchmo_ext.newsletter',
    # ****
    # * Optional feature product feeds
    # * These are usually for googlebase
    # ****
    #'satchmo_ext.product_feeds',
    # ****
    # * Optional feature, tiered pricing
    # * uncomment below, then set up in your main admin page.
    # ****
    #'satchmo_ext.tieredpricing',
    # ****
    # * Highly recommended app - use this to have access to the great
    # * "Jobs" system.  See http://code.google.com/p/django-command-extensions/
    # * Make sure to set up your crontab to run the daily, hourly and
monthly
    # * jobs.
    # ****
    #'django_extensions',
    'mystore.site',

)

AUTHENTICATION_BACKENDS = (
    'satchmo_store.accounts.email-auth.EmailBackend',
    'django.contrib.auth.backends.ModelBackend',
)

AUTH_PROFILE_MODULE='contact.Contact'
LOGIN_REDIRECT_URL = '/accounts/'

# Locale path settings.  Needs to be set for Translation compilation.
# It can be blank
# LOCALE_PATHS = ""

# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'us'

# Languages for your site.  The language name
# should be the utf-8 encoded local name for the language.
gettext_noop = lambda s:s

LANGUAGES = (
    ('en', gettext_noop('English')),
)

from django.conf.urls.defaults import patterns, include

SATCHMO_SETTINGS = {
    # this will override any urls set in the store url modules
    'SHOP_URLS' : patterns('',
        # disable this if you don't want multi-language
        (r'^i18n/', include('l10n.urls')),

        # paypal urls need special treatment
        # (r'^checkout/pay/$',
'payment.modules.paypal.checkout_step2.pay_ship_info',
        #     {'SSL': False}, 'satchmo_checkout-step2'),
        # (r'^checkout/confirm/$',
'paypal.checkout_step3.confirm_info',
        #     {'SSL': False}, 'satchmo_checkout-
step3'),
    ),

    # This is the base url for the shop.  Only include a leading slash
    # examples: '/shop' or '/mystore'
    # If you want the shop at the root directory, set SHOP_BASE to ''
    'SHOP_BASE' : '/store',

    # Set this to true if you want to use the multi-shop features
    # of satchmo.  It requires the "threaded_multihost" application
    # to be on your pythonpath.
    'MULTISHOP' : False,
}

# Load the local settings
from local_settings import *


local_settings.py:

# This file is used to store your site specific settings
# for database access.
#
# Modify this file to reflect your settings, then rename it to
# local_settings.py
#
# This file is helpful if you have an existing Django project.
# These are specific things that Satchmo will need.
# you MUST make sure these settings are imported from your project
settings file!

import os
import logging
DIRNAME = os.path.abspath(os.path.dirname(__file__).decode('utf-8'))
# This is useful, since satchmo is not the "current directory" like
load_data expects.
SATCHMO_DIRNAME = 'F:\Python\satchmo\satchmo\apps\satchmo_store\shop'

# Only set these if Satchmo is part of another Django project
#SITE_NAME = ''
#ROOT_URLCONF = ''
#MEDIA_ROOT = os.path.join(DIRNAME, 'static/')
#DJANGO_PROJECT = 'Your Main Project Name'
#DJANGO_SETTINGS_MODULE = 'main-project.settings'
DATABASE_OPTIONS = { "init_command": 'SET NAMES "utf8"' ,
"init_command":'SET storage_engine=INNODB' , }
DATABASE_NAME = 'mystore'
DATABASE_PASSWORD = '123'
DATABASE_USER = 'root'
SECRET_KEY = 'asdf'

##### For Email ########
# If this isn't set in your settings file, you can set these here
#EMAIL_HOST = 'host here'
#EMAIL_PORT = 587
#EMAIL_HOST_USER = 'your user here'
#EMAIL_HOST_PASSWORD = 'your password'
#EMAIL_USE_TLS = True

#### Satchmo unique variables ####

#These are used when loading the test data
SITE_DOMAIN = "example.com"
SITE_NAME = "My Site"

# These can override or add to the default URLs
#from django.conf.urls.defaults import *
#URLS = patterns('',
#)

# a cache backend is required.  Do not use locmem, it will not work
properly at all in production
# Preferably use memcached, but file or DB is OK.  File is faster, I
don't know why you'd want to use
# db, personally.  See: http://www.djangoproject.com/documentation/cache/
for help setting up your
# cache backend
#CACHE_BACKEND = "memcached://127.0.0.1:11211/"
#CACHE_BACKEND = "file:///var/tmp/django_cache"
CACHE_TIMEOUT = 60*5

ACCOUNT_ACTIVATION_DAYS = 7

# modify the cache_prefix if you have multiple concurrent stores.
CACHE_PREFIX = "STORE"

#Configure logging
LOGDIR = os.path.abspath(os.path.dirname(__file__))
LOGFILE = "satchmo.log"
logging.basicConfig(level=logging.DEBUG,
                    format='%(asctime)s %(name)-12s %(levelname)-8s %
(message)s',
                    datefmt='%a, %d %b %Y %H:%M:%S',
                    filename=os.path.join(LOGDIR, LOGFILE),
                    filemode='w')

# define a Handler which writes INFO messages or higher to the
sys.stderr
fileLog = logging.FileHandler(os.path.join(LOGDIR, LOGFILE), 'w')
fileLog.setLevel(logging.DEBUG)
# set a format which is simpler for console use
formatter = logging.Formatter('%(asctime)s %(name)-12s: %
(levelname)-8s %(message)s')
# tell the handler to use this format
fileLog.setFormatter(formatter)
# add the handler to the root logger
logging.getLogger('').addHandler(fileLog)
logging.getLogger('keyedcache').setLevel(logging.INFO)
logging.info("Satchmo Started")

TEMPLATE_DIRS = (
    os.path.join(DIRNAME, "templates"),
    os.path.join(SATCHMO_DIRNAME, "templates"),
)

thanks, Sam
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Satchmo users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/satchmo-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to