LIVESETTINGS_OPTIONS doesn't init data in db

Issue #990 resolved
Franck Bret created an issue

If you put a dictionary like this in your settings, even putting DB to true or false, livesettings doesn't do what we are waiting for, ie using the dictionnary value. Also it doesn't log any explicit message... This is tested with postgres and simple db with local server and CACHE_BACKEND = 'locmem://'

Simple db test steps LIVESETTINGS_OPTIONS = 'True': set LIVESETTINGS_OPTIONS to 'True' create a new db syncdb satchmo_load_l10n check http://127.0.0.1:8000/settings/ result = settings are accessible, editable and saveable but they are not set by LIVESETTINGS_OPTIONS, just default value set via back office a different CRON_KEY on PAYMENT "blabla" CRON_KEY new valule is saved but message fired is

"Updated CREDITCHOICES on PAYMENT_DUMMY Updated REQUIRED_BILLING_DATA on SHOP Updated CRON_KEY on PAYMENT"

hum why ?

Simple db test steps LIVESETTINGS_OPTIONS = 'False': set LIVESETTINGS_OPTIONS to 'False' relaunch server * http://127.0.0.1:8000/settings/ is still accessible

I've done a new serie of tests deleting cache between all steps + changing db to postgres. Doesn't change nothing...

The other strange thing is that on production server (with Apache/2.2.8 + mod_wsgi: Runtime using Python/2.5.2 + psql (PostgreSQL) 8.3.8 + ) CACHE_BACKEND = 'memcached://127.0.0.1:11211/' when LIVESETTINGS_OPTIONS = 'False' i can't access to settings and get this message in backoffice like expected : Livesettings are disabled for this site. All configuration options must be edited in the site settings.py file and for example WISHLIST_SLUG is as expected the same as defined in settings.

So last test, set LIVESETTINGS_OPTIONS = 'True' and go to http://mysite.com/settings/ LiveSettings are accessible but not valued by the LIVESETTINGS_OPTIONS dict...

{{{

!python

LIVESETTINGS_OPTIONS = { 1 : { 'DB' : 'True', 'SETTINGS' : { 'GOOGLE': { 'ANALYTICS': 'True' }, 'SHOP': { 'ACCOUNT_VERIFICATION': 'EMAIL', 'AUTHENTICATION_REQUIRED': 'True', 'ENFORCE_STATE': 'False', 'WISHLIST_SLUG': 'i-want-it' }, 'PRODUCT': { 'BRAND_SLUG': 'i-want-brand', 'IMAGE_DIR': 'pictures', 'MEASUREMENT_SYSTEM': '["metric"]', 'NUM_DISPLAY': '24', 'NUM_PAGINATED': '8', 'RANDOM_FEATURED': 'True', 'RECENT_MAX': '8' }, 'THUMBNAIL': { 'RENAME_IMAGES': 'False' } } } } }}}

Comments (6)

  1. Franck Bret reporter

    Yes It can because i'm running 2.5 on server, maybe it's related... Will check when got 5 minutes...

  2. Log in to comment