Did you use "./manage.py shell" to get into a shell, or just "python".
Because you should use "./manage.py shell"


On Wed, Apr 7, 2010 at 1:50 PM, Ricko <[email protected]> wrote:

> I cant even import livesettings:
>
>  File "<stdin>", line 1, in <module>
>  File "/Library/Python/2.5/site-packages/django_livesettings-1.4_3-
> py2.5.egg/livesettings/__init__.py", line 14, in <module>
>    from functions import *
>   File "/Library/Python/2.5/site-packages/django_livesettings-1.4_3-
> py2.5.egg/livesettings/functions.py", line 2, in <module>
>    from livesettings import values
>   File "/Library/Python/2.5/site-packages/django_livesettings-1.4_3-
> py2.5.egg/livesettings/values.py", line 12, in <module>
>    from livesettings.models import find_setting, LongSetting,
> Setting, SettingNotSet
>   File "/Library/Python/2.5/site-packages/django_livesettings-1.4_3-
> py2.5.egg/livesettings/models.py", line 2, in <module>
>    from django.contrib.sites.models import Site
>  File "/Library/Python/2.5/site-packages/django/contrib/sites/
> models.py", line 1, in <module>
>    from django.db import models
>  File "/Library/Python/2.5/site-packages/django/db/__init__.py", line
> 10, in <module>
>    if not settings.DATABASE_ENGINE:
>  File "/Library/Python/2.5/site-packages/django/utils/functional.py",
> line 269, in __getattr__
>    self._setup()
>  File "/Library/Python/2.5/site-packages/django/conf/__init__.py",
> line 38, in _setup
>    raise ImportError("Settings cannot be imported, because
> environment variable %s is undefined." % ENVIRONMENT_VARIABLE)
> ImportError: Settings cannot be imported, because environment variable
> DJANGO_SETTINGS_MODULE is undefined.
>
>
> But here it is in the local_settings.py:
>
> # Only set these if Satchmo is part of another Django project
> #These are used when loading the test data
> SITE_NAME = "simple"
> MEDIA_ROOT = os.path.join(SATCHMO_DIRNAME, 'static/')
> DJANGO_PROJECT = 'simple'
> DJANGO_SETTINGS_MODULE = 'simple.settings'
>
> Rick
>
> On Apr 7, 1:40 pm, Chris Moffitt <[email protected]> wrote:
> > Interesting. I'm not at my dev box right now so I'll have to play with
> this
> > later this evening. I'm not sure why it's erroring out. I'll have to see
> if
> > I can find a way to reproduce this.
> >
> > -Chris
> >
> > On Wed, Apr 7, 2010 at 3:13 PM, bradleykay <[email protected]>
> wrote:
> > > Is this what you mean?
> >
> > > >>> import livesettings
> > > >>> from livesettings import config_value
> > > >>> config_value('PRODUCT', 'NUM_DISPLAY')
> > > Traceback (most recent call last):
> > >  File "<console>", line 1, in <module>
> > >  File "/home/brad/.local/lib/python2.6/site-packages/livesettings/
> > > functions.py", line 204, in config_value
> > >     return config_get(group, key).value
> > >   File "/home/brad/.local/lib/python2.6/site-packages/livesettings/
> > > functions.py", line 149, in config_get
> > >    return ConfigurationSettings().get_config(group, key)
> > >  File "/home/brad/.local/lib/python2.6/site-packages/livesettings/
> > > functions.py", line 66, in get_config
> > >     raise SettingNotSet('%s config group does not exist' % group)
> > > SettingNotSet
> >
> > > On Apr 7, 12:55 pm, Chris Moffitt <[email protected]> wrote:
> > > > If you try to access the a product value from python manage.py shell,
> > > what
> > > > do you see?
> >
> > > > -Chris
> >
> > > > On Wed, Apr 7, 2010 at 12:56 PM, bradleykay <[email protected]>
> > > wrote:
> > > > > Hey guys.  I don't mean to interrupt, but I think I know what the
> > > > > problem is.  I am experiencing it as well.  I believe the problem
> is
> > > > > that the PRODUCT group of settings are not correctly getting
> > > > > registered with livesettings.  If you go to
> > > > >http://localhost:8000/settings/
> > > > > after starting up the 'simple' site, there are no product settings
> > > > > there.  Still trying to figure out the cause of the error though...
> >
> > > > > On Apr 7, 10:48 am, Ricko <[email protected]> wrote:
> > > > > > I'm trying to get the 'Simple' Satchmo project working, as I
> figure
> > > > > > all the settings will be correct on there. I haven't changed
> anything
> > > > > > there either in settings.py or local_settings.py, so it will all
> be
> > > > > > the same as you see (locmem cache etc)
> >
> > > > > > From there, I run python manage.py test livesettings, all tests
> pass.
> >
> > > > > > Then I run syncdb, I get:
> >
> > > > > > Not synced (use migrations):
> > > > > >  - product
> > > > > > (use ./manage.py migrate to migrate these)
> >
> > > > > > Then I runserver, it loads up. I can then go to the admin login
> page
> > > > > > fine, but nowhere else, everywhere else fails with the 'Settings
> Not
> > > > > > Set' error, specifically :
> >
> > > > > > PRODUCT.NUM_DISPLAY
> >
> > > > > > Something I noticed which probably isn't relevant, but if I go to
> > > > > > Satchmo>apps>I don't see 'Livesettings' or 'KeyedCache' dirs. Is
> that
> > > > > > right, shouldn't they be there?
> >
> > > > > > Rick
> >
> > > > > > On Apr 7, 10:35 am, Chris Moffitt <[email protected]> wrote:
> >
> > > > > > > Your cache settings should be in your local_settings.py file.
> >
> > > > > > > Your DB_ENGINE variable doesn't have to be the full dotted
> path.
> > > > > sqlite3
> > > > > > > should be sufficient
> >
> > > > > > > I doubt this is the problem but I thought I'd mention it.
> >
> > > > > > > Also, please use dpaste.com (or something similar) to post
> links
> > > to
> > > > > your
> > > > > > > full config files.
> >
> > > > > > > Thanks,
> > > > > > > Chris
> >
> > > > > > > On Wed, Apr 7, 2010 at 11:20 AM, Ricko <[email protected]>
> > > wrote:
> > > > > > > > Hi Chris,
> >
> > > > > > > > I'm not sure about the cache backend, where do I look?
> >
> > > > > > > > My DB is sqlite3.
> >
> > > > > > > > I can't see any livesettings config settings in my
> settings.py
> > > file.
> > > > > > > > Should they be there, is that the problem?Here is my
> settings.py
> > > > > file:
> >
> > > > > > > > import os
> >
> > > > > > > > DIRNAME = os.path.abspath(os.path.dirname(__file__))
> > > > > > > > LOCAL_DEV = True
> >
> > > > > > > > MEDIA_ROOT = '/Users/ricko/Documents/Django
> > > Projects/Consortium/DEV/
> > > > > > > > www/artvswall/static'
> > > > > > > > MEDIA_URL = 'http://artvswall.com/static/'
> >
> > > > > > > > AUTHENTICATION_BACKENDS = (
> > > > > > > >    'satchmo_store.accounts.email-auth.EmailBackend',
> > > > > > > >    'django.contrib.auth.backends.ModelBackend'
> > > > > > > >    )
> >
> > > > > > > > #### Satchmo unique variables ####
> > > > > > > > from django.conf.urls.defaults import patterns, include
> > > > > > > > SATCHMO_SETTINGS = {
> > > > > > > >                    'SHOP_BASE' : '/store',
> > > > > > > >                    'MULTISHOP' : False,
> > > > > > > >                    'SHOP_URLS' :
> > > > > > > > patterns('satchmo_store.shop.views',)
> > > > > > > >                    }
> >
> > > > > > > > # Load the local settings
> > > > > > > > from local_settings import *
> >
> > > > > > > > DEBUG = True
> > > > > > > > TEMPLATE_DEBUG = DEBUG
> >
> > > > > > > > ADMINS = (
> > > > > > > >    # ('Your Name', '[email protected]'),
> > > > > > > > )
> >
> > > > > > > > MANAGERS = ADMINS
> >
> > > > > > > > DATABASE_ENGINE = 'django.db.backends.sqlite3'
> > > > > > > > DATABASE_NAME = 'artvswall.sqlite3'
> > > > > > > > DATABASE_USER = ''
> > > > > > > > DATABASE_PASSWORD = ''
> > > > > > > > DATABASE_HOST = ''
> > > > > > > > DATABASE_PORT = ''
> >
> > > > > > > > # 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 available 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/Chicago'
> >
> > > > > > > > # 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 = False
> >
> > > > > > > > # 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/'
> >
> > > > > > > > # 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.contrib.flatpages.middleware.FlatpageFallbackMiddleware",
> > > > > > > > "django.middleware.doc.XViewMiddleware",
> > > > > > > > "threaded_multihost.middleware.ThreadLocalMiddleware",
> > > > > > > > "satchmo_store.shop.SSLMiddleware.SSLRedirect")
> >
> > > > > > > > ROOT_URLCONF = 'artvswall.urls'
> >
> > > > > > > > TEMPLATE_DIRS = (os.path.join(DIRNAME, "templates"))
> >
> > > > > > > > TEMPLATE_CONTEXT_PROCESSORS =
> > > > > > > > ('satchmo_store.shop.context_processors.settings',
> > > > > > > >    'django.core.context_processors.auth',
> > > > > > > >    'django.core.context_processors.i18n',
> > > > > > > > )
> >
> > > > > > > > INSTALLED_APPS = (
> > > > > > > >         'django.contrib.sites',
> > > > > > > >        'satchmo_store.shop',
> > > > > > > >        'django.contrib.admin',
> > > > > > > >        'django.contrib.auth',
> > > > > > > >         'django.contrib.admindocs',
> > > > > > > >         'django.contrib.contenttypes',
> > > > > > > >        'django.contrib.comments',
> > > > > > > >        'django.contrib.sessions',
> > > > > > > >        'django.contrib.sitemaps',
> > > > > > > >         'django.contrib.flatpages',
> > > > > > > >        'registration',
> > > > > > > >        'keyedcache',
> > > > > > > >        'livesettings',
> > > > > > > >        'l10n',
> > > > > > > >        'sorl.thumbnail',
> > > > > > > >         'satchmo_store.contact',
> > > > > > > >        'tax',
> > > > > > > >        'tax.modules.no',
> > > > > > > >        'tax.modules.area',
> > > > > > > >        'tax.modules.percent',
> > > > > > > >        'shipping',
> > > > > > > >        'product',
> > > > > > > >        'payment',
> > > > > > > >         'payment.modules.giftcertificate',
> > > > > > > >        'satchmo_utils',
> > > > > > > >        'app_plugins',
> > > > > > > >        'artvswall.website',
> > > > > > > >        )
> >
> > > > > > > > On Apr 7, 6:21 am, Chris Moffitt <[email protected]> wrote:
> > > > > > > > > What cache backend and db are you using?
> >
> > > > > > > > > For some reason, livesettings isn't picking up the config
> > > values.
> > > > > > > > Sometimes
> > > > > > > > > a db or cache misconfiguration can cause oddities.
> >
> > > > > > > > > -Chris
> >
> > > > > > > > > On Tue, Apr 6, 2010 at 11:06 PM, Ricko <
> [email protected]>
> > > > > wrote:
> > > > > > > > > > OK, I ran a syncdb and it gives me the following:
> >
> > > > > > > > > > Not synced (use migrations):
> > > > > > > > > >  - product
> > > > > > > > > > (use ./manage.py migrate to migrate these)
> >
> > > > > > > > > > Don't know what to do with this statement. Also, in the
> log
> > > file
> > > > > after
> > > > > > > > > > I try to go to the URLhttp://127.0.0.1:8000/
> >
> > > > > > > > > > Tue, 06 Apr 2010 21:05:29 payment.urls DEBUG    Found
> payment
> > > > > > > > > > processor: DUMMY, adding urls at ^dummy/
> > > > > > > > > > Tue, 06 Apr 2010 21:05:29 payment.urls DEBUG    Found
> payment
> > > > > > > > > > processor: PAYPAL, adding urls at ^paypal/
> > > > > > > > > > Tue, 06 Apr 2010 21:05:29 configuration DEBUG
> > >  SettingNotSet:
> > > > > > > > > > PRODUCT.NUM_DISPLAY
> >
> > > > > > > > > > Does this help?
> >
> > > > > > > > > > Rick
> >
> > > > > > > > > > On Apr 6, 8:44 pm, Ricko <[email protected]> wrote:
> > > > > > > > > > > Hi Chris,
> >
> > > > > > > > > > > Tried running the clonesatchmo script, exactly the same
> > > error
> > > > > as
> > > > > > > > > > > above. I also have a known working Satchmo store from
> >
> > ...
> >
> > read more ยป
>
> --
> 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]<satchmo-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/satchmo-users?hl=en.
>
>

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