Site Sections: Satchmo Main | Wiki | Demo Store |

root/satchmo/trunk/satchmo/local_settings-customize.py

Revision 1632, 3.2 kB (checked in by bkroeze, 1 month ago)

modifying the optional product translation feature to use SATCHMO_SETTINGS instead of a configuration setting

  • Property svn:eol-style set to native
Line 
1 # This file is used to store your site specific settings
2 # for database access.
3 # It also store satchmo unique information
4 #
5 #
6 # Modify this file to reflect your settings, then rename it to
7 # local_settings.py
8 #
9 # This file is helpful if you have an existing Django project. 
10 # These are specific things that Satchmo will need.
11 # you MUST make sure these settings are imported from your project settings file!
12
13 import os
14 import logging
15
16 # This is useful, since satchmo is not the "current directory" like load_data expects.
17 # SATCHMO_DIRNAME = ''
18
19 # Only set these if Satchmo is part of another Django project
20 #SITE_NAME = ''
21 #ROOT_URLCONF = ''
22 #MEDIA_ROOT = os.path.join(DIRNAME, 'static/')
23 #DJANGO_PROJECT = 'Your Main Project Name'
24 #DJANGO_SETTINGS_MODULE = 'main-project.settings'
25 #DATABASE_NAME = ''
26 #DATABASE_PASSWORD = ''
27 #DATABASE_USER = ''
28 #SECRET_KEY = ''
29
30 ##### For Email ########
31 # If this isn't set in your settings file, you can set these here
32 #EMAIL_HOST = 'host here'
33 #EMAIL_PORT = 587
34 #EMAIL_HOST_USER = 'your user here'
35 #EMAIL_HOST_PASSWORD = 'your password'
36 #EMAIL_USE_TLS = True
37
38 #### Satchmo unique variables ####
39
40 #These are used when loading the test data
41 SITE_DOMAIN = "example.com"
42 SITE_NAME = "My Site"
43
44 from django.conf.urls.defaults import *
45
46 # These can override or add to the default URLs
47 from django.conf.urls.defaults import *
48 URLS = patterns('',
49 )
50
51 # a cache backend is required.  Do not use locmem, it will not work properly at all in production
52 # Preferably use memcached, but file or DB is OK.  File is faster, I don't know why you'd want to use
53 # db, personally.  See: http://www.djangoproject.com/documentation/cache/ for help setting up your
54 # cache backend
55 #CACHE_BACKEND = "memcached://127.0.0.1:11211/"
56 #CACHE_BACKEND = "file:///var/tmp/django_cache"
57 CACHE_TIMEOUT = 60*5
58
59 # modify the cache_prefix if you have multiple concurrent stores.
60 CACHE_PREFIX = "STORE"
61
62
63 # Language code for this installation. All choices can be found here:
64 # http://www.i18nguy.com/unicode/language-identifiers.html
65 LANGUAGE_CODE = 'en-us'
66
67 # Languages for your site.  The language name
68 # should be the utf-8 encoded local name for the language.
69 gettext_noop = lambda s:s
70
71 LANGUAGES = (
72     ('en', gettext_noop('English')),
73 )
74
75 # Locale path settings.  Needs to be set for Translation compilation.
76 # It can be blank
77 # LOCALE_PATHS = ""
78
79 #Configure logging
80 LOGDIR = os.path.abspath(os.path.dirname(__file__))
81 LOGFILE = "satchmo.log"
82 logging.basicConfig(level=logging.DEBUG,
83                     format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
84                     datefmt='%a, %d %b %Y %H:%M:%S',
85                     filename=os.path.join(LOGDIR, LOGFILE),
86                     filemode='w')
87
88 # define a Handler which writes INFO messages or higher to the sys.stderr
89 fileLog = logging.FileHandler(os.path.join(LOGDIR, LOGFILE), 'w')
90 fileLog.setLevel(logging.DEBUG)
91 # set a format which is simpler for console use
92 formatter = logging.Formatter('%(asctime)s %(name)-12s: %(levelname)-8s %(message)s')
93 # tell the handler to use this format
94 fileLog.setFormatter(formatter)
95 # add the handler to the root logger
96 logging.getLogger('').addHandler(fileLog)
97 logging.getLogger('caching').setLevel(logging.INFO)
98 logging.info("Satchmo Started")
Note: See TracBrowser for help on using the browser.