What server configuration are you using and how are you trying to start the
django process?

You might want to look in your web server logs for more info too.

-Chris

On Mon, Sep 21, 2009 at 7:49 PM, neridaj <[email protected]> wrote:

>
> Hello,
>
> I've tested my store locally and everything seems to be working
> properly. I've been trying to deploy what I have and it seems like
> there's a problem with either settings or local_settings. I've created
> a project with django-admin.py and I get the default congratulations
> page so I know things are working, however, when I use the settings
> files for satchmo I get "500 Internal Server Error". The settings
> files that worked for me locally were taken from:
>
>
> http://www.saltycrane.com/blog/2008/12/card-store-project-3-installing-satchmo-part-2/
>
> I've tried commenting things out and running pkill python to narrow
> down what it is but I haven't found anything. If anyone sees anything
> questionable in these settings files I would really appreciate some
> feedback.
>
> Thanks,
>
> Jason
>
> # 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'
> DJANGO_SETTINGS_MODULE = 'satchmo_store.settings'
>
> LOCAL_DEV = False
> DEBUG = False
> TEMPLATE_DEBUG = DEBUG
>
> ADMINS = (
>     ('username', '[email protected]'),
> )
>
> 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 = 'mysite_db'             # Or path to database file if
> using sqlite3.
> DATABASE_USER = 'username'             # Not used with sqlite3.
> DATABASE_PASSWORD = 'password'         # Not used with sqlite3.
> DATABASE_HOST = 'mysql.mysite.com'             # 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/Seattle'
>
> # 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 = 'en-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 = "/home/username/media/media.mysite.com/"
> # URL that handles the media served from MEDIA_ROOT. Use a trailing
> slash.
> # Example: "http://media.lawrence.com/";
> MEDIA_URL = 'http://media.mysite.com/'
> # 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 = '/admin_media/'
>
> # Make this unique, and don't share it with anybody.
> SECRET_KEY = 'My S3cr3t K3y'
>
> # 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 = 'mysite.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',
>    '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',
>    # *****
>    # * Optional feature - admin toolbar for satchmo
>    # * Uncomment below to enable
>    # *
>    # *****
>    #'satchmo_ext.satchmo_toolbar',
>    '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',
>    'mysite.store',
> )
>
> 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 = 'en-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
>
> # This is useful, since satchmo is not the "current directory" like
> load_data expects.
> DIRNAME = os.path.dirname(__file__)
> from distutils.sysconfig import get_python_lib
> SATCHMO_DIRNAME = os.path.join(get_python_lib(), 'satchmo')
> TEMPLATE_DIRS = (
> os.path.join(DIRNAME, "templates"),
> os.path.join(SATCHMO_DIRNAME, "templates"),
> )
>
> # 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_NAME = 'mysite_db'
> # DATABASE_PASSWORD = 'password'
> # DATABASE_USER = 'username'
> SECRET_KEY = ' '
>
> ##### 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 = "mysite.com"
> SITE_NAME = "mysite"
>
> # 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://" + DIRNAME + "/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")
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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