LiveSettings problem with Postgresql

44 views
Skip to first unread message

Mauricio Mercado

unread,
Apr 18, 2011, 5:34:21 PM4/18/11
to Satchmo developers

Hello all,

Im having a really strange problem with livesettings... I recently moved my DB with pg_dump to another server, and recently Ive found the error shown below DEBUG INFO...

Everything works great except for when I go to mysite.com/settings/ and I try to do a modification and it would just show that error... what could be the problem?

Anyone else have had this problem?

Thank you all...

DEBUG INFO:

Traceback (most recent call last):

 File "/home/rincon/sites/rinconcolombia/lib/python2.6/site-packages/django/core/handlers/base.py", line 100, in get_response
   response = callback(request, *callback_args, **callback_kwargs)

 File "/home/rincon/sites/rinconcolombia/lib/python2.6/site-packages/livesettings/views.py", line 69, in site_settings
   return group_settings(request, group=None, template='livesettings/site_settings.html')

 File "/home/rincon/sites/rinconcolombia/lib/python2.6/site-packages/django/views/decorators/cache.py", line 69, in _wrapped_view_func
   response = view_func(request, *args, **kwargs)

 File "/home/rincon/sites/rinconcolombia/lib/python2.6/site-packages/django/contrib/admin/views/decorators.py", line 33, in _checklogin
   return view_func(request, *args, **kwargs)

 File "/home/rincon/sites/rinconcolombia/lib/python2.6/site-packages/livesettings/views.py", line 44, in group_settings
   if cfg.update(value):

 File "/home/rincon/sites/rinconcolombia/lib/python2.6/site-packages/livesettings/values.py", line 341, in update
   s.save()

 File "/home/rincon/sites/rinconcolombia/lib/python2.6/site-packages/livesettings/models.py", line 124, in save
   super(Setting, self).save(force_insert=force_insert, force_update=force_update)

 File "/home/rincon/sites/rinconcolombia/lib/python2.6/site-packages/django/db/models/base.py", line 434, in save
   self.save_base(using=using, force_insert=force_insert, force_update=force_update)

 File "/home/rincon/sites/rinconcolombia/lib/python2.6/site-packages/django/db/models/base.py", line 527, in save_base
   result = manager._insert(values, return_id=update_pk, using=using)

 File "/home/rincon/sites/rinconcolombia/lib/python2.6/site-packages/django/db/models/manager.py", line 195, in _insert
   return insert_query(self.model, values, **kwargs)

 File "/home/rincon/sites/rinconcolombia/lib/python2.6/site-packages/django/db/models/query.py", line 1479, in insert_query
   return query.get_compiler(using=using).execute_sql(return_id)

 File "/home/rincon/sites/rinconcolombia/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 783, in execute_sql
   cursor = super(SQLInsertCompiler, self).execute_sql(None)

 File "/home/rincon/sites/rinconcolombia/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 727, in execute_sql
   cursor.execute(sql, params)

 File "/home/rincon/sites/rinconcolombia/lib/python2.6/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
   return self.cursor.execute(query, args)

IntegrityError: duplicate key value violates unique constraint "livesettings_setting_site_id_key"



<WSGIRequest
GET:<QueryDict: {}>,
POST:<QueryDict: {u'PRODUCT__IMAGE_DIR': [u'images'], u'NEWSLETTER__MODULE': [u'satchmo_ext.newsletter.simple'], u'PRODUCT__NUM_DISPLAY': [u'20'], u'SHOP__CART_PRECISION': [u'0'], u'PAYMENT_PAGOSONLINE__MERCHANT_CURRENCY': [u'COP'], u'PAYMENT_PAGOSONLINE__MERCHANT_TITULAR': [u''], u'PAYMENT_PAGOSONLINE__MERCHANT_USERID_CODE': [u''], u'PAYMENT__CC_NUM_YEARS': [u'10'], u'PAYMENT_PAGOSONLINE__LABEL': [u'Pagos Online'], u'SHOP__ACCOUNT_VERIFICATION': [u'EMAIL'], u'SHOP__CART_ROUNDING': [u'1'], u'SHOP__LOGO_URI': [u'file:///home/rincon/sites/rinconcolombia/checkouts/rinconcolombia/../rinconcolombia/static/images/sample-logo.bmp'], u'PAYMENT_PAGOSONLINE__KEY': [u'PAGOSONLINE'], u'PRODUCT__RECENT_MAX': [u'4'], u'PAYMENT__MINIMUM_ORDER': [u'0.00'], u'SHOP__REQUIRED_SHIPPING_DATA': [u'addressee', u'street1', u'city', u'postal_code', u'country'], u'SHIPPING__SELECT_CHEAPEST': [u'on'], u'TAX__TAX_AREA_ADDRESS': [u'ship'], u'SHIPPING__MODULES': [u'shipping.modules.per'], u'SHOP__SHOW_SITE': [u'on'], u'PRODUCT__PROTECTED_DIR': [u'protected'], u'PRODUCT__NO_STOCK_CHECKOUT': [u'on'], u'TAX__TAX_CLASS': [u'Shipping'], u'SHOP__ENFORCE_STATE': [u'on'], u'csrfmiddlewaretoken': [u'ddc2d551ef78beaa43083147087a0d29'], u'SHOP__REQUIRED_BILLING_DATA': [u'email', u'first_name', u'last_name', u'phone', u'street1', u'city', u'postal_code', u'country', u'agree_terms'], u'PAYMENT__CRON_KEY': [u'x1234replace_me'], u'SHIPPING__HIDING': [u'NO'], u'SHIPPING__PER_RATE': [u'4.00'], u'PAYMENT_PAGOSONLINE__MODULE': [u'payment.modules.pagosonline'], u'TAX__MODULE': [u'tax.modules.no'], u'PRODUCT__NUM_PAGINATED': [u'10'], u'NEWSLETTER__NEWSLETTER_SLUG': [u'newsletter'], u'PAYMENT_PAGOSONLINE__POST_TEST_URL': [u'https://gateway2.pagosonline.net/apps/gateway/index.html'], u'PAYMENT_PAGOSONLINE__MERCHANT_URL_OK': [u'PAGOSONLINE_satchmo_checkout-answer'], u'SHIPPING__PER_SERVICE': [u'U.S. Mail'], u'PRODUCT__TRACK_INVENTORY': [u'on'], u'PAYMENT_PAGOSONLINE__URL_BASE': [u'^pagosonline/'], u'PAYMENT__USE_DISCOUNTS': [u'on'], u'PAYMENT_PAGOSONLINE__POST_URL': [u'https://gateway.pagosonline.net/apps/gateway/index.html'], u'SHIPPING__PER_DAYS': [u'3 - 4 business days'], u'THUMBNAIL__RENAME_IMAGES': [u'on'], u'SHOP__WISHLIST_SLUG': [u'wishlist'], u'PAYMENT__COUNTRY_MATCH': [u'on'], u'PAYMENT_PAGOSONLINE__MERCHANT_SIGNATURE_CODE': [u''], u'PAYMENT_PAGOSONLINE__MERCHANT_URL_CALLBACK': [u'PAGOSONLINE_satchmo_checkout-notify_callback'], u'THUMBNAIL__IMAGE_QUALITY': [u'75'], u'PRODUCT__MEASUREMENT_SYSTEM': [u'imperial']}>,
COOKIES:{'blackbird': '{pos:1,size:0,load:null}',
'csrftoken': 'ddc2d551ef78beaa43083147087a0d29',
'sessionid': '573a6b9c1983ce4a162eb99c5f5a384f'},
META:{'CONTENT_LENGTH': '2361',
'CONTENT_TYPE': 'application/x-www-form-urlencoded',
'CSRF_COOKIE': 'ddc2d551ef78beaa43083147087a0d29',
'HTTP_ACCEPT': 'application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8,es;q=0.6',
'HTTP_CACHE_CONTROL': 'max-age=0',
'HTTP_CONNECTION': 'close',
'HTTP_COOKIE': 'blackbird={pos:1,size:0,load:null}; sessionid=573a6b9c1983ce4a162eb99c5f5a384f; csrftoken=ddc2d551ef78beaa43083147087a0d29',
'HTTP_HOST': 'www.rinconcolombia.com',
'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16',
'HTTP_X_FORWARDED_FOR': '190.1.162.150',
'HTTP_X_REAL_IP': '190.1.162.150',
'PATH_INFO': u'/settings/',
'QUERY_STRING': '',
'RAW_URI': '/settings/',
'REMOTE_ADDR': '190.1.162.150',
'REMOTE_PORT': '80',
'REQUEST_METHOD': 'POST',
'SCRIPT_NAME': u'',
'SERVER_NAME': 'www.rinconcolombia.com',
'SERVER_PORT': '80',
'SERVER_PROTOCOL': 'HTTP/1.0',
'SERVER_SOFTWARE': 'gunicorn/0.12.2',
'gunicorn.socket': <socket._socketobject object at 0xac6ea3c>,
'wsgi.errors': <open file '<stderr>', mode 'w' at 0xb744c0d0>,
'wsgi.file_wrapper': <class gunicorn.http.wsgi.FileWrapper at 0x9ff02cc>,
'wsgi.input': <gunicorn.http.body.Body object at 0xaba184c>,
'wsgi.multiprocess': True,
'wsgi.multithread': False,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 0)}>

Mauricio Mercado
Electronics Engineer
System Administrator - Python Developer

3165295908
Web : http://www.maumercado.com
Email : maume...@gmail.com

___________________
Cra 50 # 150 - 48
Colombia, Bogota D.C.

chris....@gmail.com

unread,
Apr 18, 2011, 8:27:52 PM4/18/11
to satchmo-d...@googlegroups.com
I have seen this sort of error before with older versions of Satchmo and livesettings. What version do you have in place?

Take a look at your livesettings values in the db and see where the dupe might be. The other option is to remove all the values (store them somewhere else) and re-enter them one by one.

-Chris
> GET:,
> POST:simple'], u'PRODUCT__NUM_DISPLAY': [u'20'], u'SHOP__CART_PRECISION': [u'0'], u'PAYMENT_PAGOSONLINE__MERCHANT_CURRENCY': [u'COP'], u'PAYMENT_PAGOSONLINE__MERCHANT_TITULAR': [u''], u'PAYMENT_PAGOSONLINE__MERCHANT_USERID_CODE': [u''], u'PAYMENT__CC_NUM_YEARS': [u'10'], u'PAYMENT_PAGOSONLINE__LABEL': [u'Pagos Online'], u'SHOP__ACCOUNT_VERIFICATION': [u'EMAIL'], u'SHOP__CART_ROUNDING': [u'1'], u'SHOP__LOGO_URI': [u'file:///home/rincon/sites/rinconcolombia/checkouts/rinconcolombia/../rinconcolombia/static/images/sample-logo.bmp'], u'PAYMENT_PAGOSONLINE__KEY': [u'PAGOSONLINE'], u'PRODUCT__RECENT_MAX': [u'4'], u'PAYMENT__MINIMUM_ORDER': [u'0.00'], u'SHOP__REQUIRED_SHIPPING_DATA': [u'addressee', u'street1', u'city', u'postal_code', u'country'], u'SHIPPING__SELECT_CHEAPEST': [u'on'], u'TAX__TAX_AREA_ADDRESS': [u'ship'], u'SHIPPING__MODULES': [u'shipping.modules.per'], u'SHOP__SHOW_SITE': [u'on'], u'PRODUCT__PROTECTED_DIR': [u'protected'], u'PRODUCT__NO_STOCK_CHECKOUT': [u'on'], u'TAX__TAX_CLASS': [u'Shipping'], u'SHOP__ENFORCE_STATE': [u'on'], u'csrfmiddlewaretoken': [u'ddc2d551ef78beaa43083147087a0d29'], u'SHOP__REQUIRED_BILLING_DATA': [u'email', u'first_name', u'last_name', u'phone', u'street1', u'city', u'postal_code', u'country', u'agree_terms'], u'PAYMENT__CRON_KEY': [u'x1234replace_me'], u'SHIPPING__HIDING': [u'NO'], u'SHIPPING__PER_RATE': [u'4.00'], u'PAYMENT_PAGOSONLINE__MODULE': [u'payment.modules.pagosonline'], u'TAX__MODULE': [u'tax.modules.no'], u'PRODUCT__NUM_PAGINATED': [u'10'], u'NEWSLETTER__NEWSLETTER_SLUG': [u'newsletter'], u'PAYMENT_PAGOSONLINE__POST_TEST_URL': [u'https://gateway2.pagosonline.net/apps/gateway/index.html'], u'PAYMENT_PAGOSONLINE__MERCHANT_URL_OK': [u'PAGOSONLINE_satchmo_checkout-answer'], u'SHIPPING__PER_SERVICE': [u'U.S. Mail'], u'PRODUCT__TRACK_INVENTORY': [u'on'], u'PAYMENT_PAGOSONLINE__URL_BASE': [u'^pagosonline/'], u'PAYMENT__USE_DISCOUNTS': [u'on'], u'PAYMENT_PAGOSONLINE__POST_URL': [u'https://gateway.pagosonline.net/apps/gateway/index.html'], u'SHIPPING__PER_DAYS': [u'3 - 4 business days'], u'THUMBNAIL__RENAME_IMAGES': [u'on'], u'SHOP__WISHLIST_SLUG': [u'wishlist'], u'PAYMENT__COUNTRY_MATCH': [u'on'], u'PAYMENT_PAGOSONLINE__MERCHANT_SIGNATURE_CODE': [u''], u'PAYMENT_PAGOSONLINE__MERCHANT_URL_CALLBACK': [u'PAGOSONLINE_satchmo_checkout-notify_callback'], u'THUMBNAIL__IMAGE_QUALITY': [u'75'], u'PRODUCT__MEASUREMENT_SYSTEM': [u'imperial']}>,
> 'gunicorn.socket': ,
> 'wsgi.errors': ', mode 'w' at 0xb744c0d0>,
> 'wsgi.file_wrapper': ,
> 'wsgi.input': ,

> 'wsgi.multiprocess': True,
> 'wsgi.multithread': False,
> 'wsgi.run_once': False,
> 'wsgi.url_scheme': 'http',
> 'wsgi.version': (1, 0)}>
>
> Mauricio Mercado
> Electronics Engineer
> System Administrator - Python Developer
>
> ___________________
> Cra 50 # 150 - 48
> Colombia, Bogota D.C.
>
>
>
>
>
>
>
>
>
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups "Satchmo developers" group.
>
> To post to this group, send email to satchmo-d...@googlegroups.com.
>
> To unsubscribe from this group, send email to satchmo-develop...@googlegroups.com.
>
>
> For more options, visit this group at http://groups.google.com/group/satchmo-developers?hl=en.
>

Mauricio Mercado

unread,
Apr 18, 2011, 10:33:59 PM4/18/11
to satchmo-d...@googlegroups.com
Hi im using satchmo 0.9-1 and django livesettings 1.4-4
I have already erased all the data from livesettings_settings also reinitiated the sequence key, funny thing is that I dont see any dups on the DB as far of id primary key is concerned.

Still havent seen whats wrong with this... 

Also it happens when no changes have been made to the settings but when gunicorn and nginx are reloaded, or only gunicorn...


Mauricio Mercado
Electronics Engineer
System Administrator - Python Developer


___________________
Cra 50 # 150 - 48
Colombia, Bogota D.C.

Mauricio Mercado

unread,
Apr 18, 2011, 10:56:03 PM4/18/11
to satchmo-d...@googlegroups.com
UPDATE...

Im using Nginx as a proxy and gunicorn also I have a custom payment method.. whenever my custom payment method receives a post to verify the purchase and such post has an error the site settings just fails with the error provided earlier...


Mauricio Mercado
Electronics Engineer
System Administrator - Python Developer


___________________
Cra 50 # 150 - 48
Colombia, Bogota D.C.
On Apr 18, 2011, at 7:27 PM, chris....@gmail.com wrote:

hynekcer

unread,
Apr 19, 2011, 1:04:15 PM4/19/11
to Satchmo developers
> Also it happens when no changes have been made to the settings but when gunicorn and nginx are reloaded, or only gunicorn...

yes, python restart is important

> also I have a custom payment method..

Even if that would be bad, livesettings should work.

What helps me to answer:

Please, look at SQL command
select * from django_site;

Domain names columns are not important for this, only the following:
- Is there only one record in the table 'django_site'?
- Is the id equal to 'settings.SITE_ID'? (probably is SITE_ID = 1)

I recommend also for easier diagnostics:
1) Upgrade livesettings to the version 1.4.8 or newer and keyedcache
to 1.4.3 or newer. (no problem. They are backward compatible.) (This
probably does not help, but it would be much easier for me to think
about the results.) I made an important change in the version
livesettings 1.4.8 related to server startup last month etc.
2) Enable the debug level of 'satchmo.log', as is usually in the
default configuration, and look for related lines later:
grep -E "livesettings|configuration" satchmo.log
3) Clear memcache after WSGI restart (i. e. gunicorn restart) by the
web form http://localsite/cache/delete/ . I suspect that with a full
cache the startup goes other ways then with an empty cache.

You can also try to change CACHE_BACKEND to 'locmem:///' temporary,
because if wsgi processes interact each other by 'memcached', it can
be more complicated to reproduce it. Is it the same?

> it happens when no changes have been made to the settings but when gunicorn reloaded.

Hmm. What "it"? There was many times "..."

The best is to describe remaining problems again, every one with a URL
and other debug info, without expecting we guess, which details in
previous posts were related to resolved subproblems, unconfirmed etc.

If a problem of livesettings remains with mentioned new versions and
you provide enough information, I would surely try to write a patch.

Mauricio Mercado

unread,
Apr 20, 2011, 10:49:44 PM4/20/11
to satchmo-d...@googlegroups.com
Hi,

Still having problems with django livesettings... the settings of the site are lost when I reboot the server or the DB.

The settings.SITE_ID is 1 and its the same as it is on the DB.

livesettings is version 1.4-7
satchmo is 0.9-1
psycopg2==2.4

This one is giving me a headache
I cleaned the full cache and lost all the settings
And for what I realize it always clashes with the first value of the table even if the sequence for the livesettings table is generated correctly...

This is the traceback:

<WSGIRequest
GET:<QueryDict: {}>,
POST:<QueryDict: {u'PRODUCT__IMAGE_DIR': [u'images'], u'NEWSLETTER__MODULE': [u'satchmo_ext.newsletter.simple'], u'PRODUCT__NUM_DISPLAY': [u'20'], u'SHOP__CART_PRECISION': [u'0'], u'PAYMENT_PAGOSONLINE__MERCHANT_CURRENCY': [u'COP'], u'PAYMENT_PAGOSONLINE__MERCHANT_TITULAR': [u''], u'PAYMENT_PAGOSONLINE__MERCHANT_USERID_CODE': [u''], u'PAYMENT__CC_NUM_YEARS': [u'10'], u'PAYMENT_PAGOSONLINE__LABEL': [u'Pagos Online'], u'SHOP__ACCOUNT_VERIFICATION': [u'EMAIL'], u'SHOP__CART_ROUNDING': [u'1'], u'SHOP__LOGO_URI': [u'file:///home/rincon/sites/rinconcolombia/checkouts/rinconcolombia/../rinconcolombia/static/images/sample-logo.bmp'], u'PAYMENT_PAGOSONLINE__KEY': [u'PAGOSONLINE'], u'PRODUCT__RECENT_MAX': [u'4'], u'PAYMENT__MINIMUM_ORDER': [u'0.00'], u'SHOP__REQUIRED_SHIPPING_DATA': [u'addressee', u'street1', u'city', u'postal_code', u'country'], u'SHIPPING__SELECT_CHEAPEST': [u'on'], u'TAX__TAX_AREA_ADDRESS': [u'ship'], u'SHIPPING__MODULES': [u'shipping.modules.per'], u'SHOP__SHOW_SITE': [u'on'], u'PRODUCT__PROTECTED_DIR': [u'protected'], u'PRODUCT__NO_STOCK_CHECKOUT': [u'on'], u'PAYMENT__ORDER_EMAIL_EXTRA': [u''], u'TAX__TAX_CLASS': [u'Shipping'], u'SHOP__ENFORCE_STATE': [u'on'], u'csrfmiddlewaretoken': [u'ddc2d551ef78beaa43083147087a0d29'], u'SHOP__REQUIRED_BILLING_DATA': [u'email', u'first_name', u'last_name', u'phone', u'street1', u'city', u'postal_code', u'country', u'agree_terms'], u'PAYMENT__CRON_KEY': [u'x1234replace_me'], u'SHIPPING__HIDING': [u'NO'], u'PAYMENT__ORDER_EMAIL_OWNER': [u'on'], u'SHIPPING__PER_RATE': [u'4.00'], u'PAYMENT_PAGOSONLINE__MODULE': [u'payment.modules.pagosonline'], u'TAX__MODULE': [u'tax.modules.no'], u'PRODUCT__NUM_PAGINATED': [u'10'], u'NEWSLETTER__NEWSLETTER_SLUG': [u'newsletter'], u'PAYMENT_PAGOSONLINE__POST_TEST_URL': [u'https://gateway.pagosonline.net/apps/gateway/index.html'], u'PAYMENT_PAGOSONLINE__MERCHANT_URL_OK': [u'PAGOSONLINE_satchmo_checkout-answer'], u'SHIPPING__PER_SERVICE': [u'U.S. Mail'], u'PRODUCT__TRACK_INVENTORY': [u'on'], u'PAYMENT_PAGOSONLINE__URL_BASE': [u'^pagosonline/'], u'PAYMENT__USE_DISCOUNTS': [u'on'], u'PAYMENT_PAGOSONLINE__POST_URL': [u'https://gateway.pagosonline.net/apps/gateway/index.html'], u'SHIPPING__PER_DAYS': [u'3 - 4 business days'], u'THUMBNAIL__RENAME_IMAGES': [u'on'], u'SHOP__WISHLIST_SLUG': [u'wishlist'], u'PAYMENT__COUNTRY_MATCH': [u'on'], u'PAYMENT_PAGOSONLINE__MERCHANT_SIGNATURE_CODE': [u''], u'PAYMENT_PAGOSONLINE__MERCHANT_URL_CALLBACK': [u'PAGOSONLINE_satchmo_checkout-notify_callback'], u'THUMBNAIL__IMAGE_QUALITY': [u'75'], u'PRODUCT__MEASUREMENT_SYSTEM': [u'imperial']}>,
COOKIES:{'csrftoken': 'ddc2d551ef78beaa43083147087a0d29',
'sessionid': 'bb81551ea0b7c86a8deca461df0d5086'},
META:{'CONTENT_LENGTH': '2418',

'CONTENT_TYPE': 'application/x-www-form-urlencoded',
'CSRF_COOKIE': 'ddc2d551ef78beaa43083147087a0d29',
'HTTP_ACCEPT': 'application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8,es;q=0.6',
'HTTP_CACHE_CONTROL': 'max-age=0',
'HTTP_CONNECTION': 'close',
'HTTP_COOKIE': 'sessionid=bb81551ea0b7c86a8deca461df0d5086; csrftoken=ddc2d551ef78beaa43083147087a0d29',

'HTTP_HOST': 'www.rinconcolombia.com',
'HTTP_ORIGIN': 'http://www.rinconcolombia.com',
'HTTP_REFERER': 'http://www.rinconcolombia.com/settings/',
'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16',
'HTTP_X_FORWARDED_FOR': '190.1.162.150',
'HTTP_X_REAL_IP': '190.1.162.150',
'PATH_INFO': u'/settings/',
'QUERY_STRING': '',
'RAW_URI': '/settings/',
'REMOTE_ADDR': '190.1.162.150',
'REMOTE_PORT': '80',
'REQUEST_METHOD': 'POST',
'SCRIPT_NAME': u'',
'SERVER_NAME': 'www.rinconcolombia.com',
'SERVER_PORT': '80',
'SERVER_PROTOCOL': 'HTTP/1.0',
'SERVER_SOFTWARE': 'gunicorn/0.12.2',
'gunicorn.socket': <socket._socketobject object at 0xa20b294>,
'wsgi.errors': <open file '<stderr>', mode 'w' at 0xb73ee0d0>,
'wsgi.file_wrapper': <class gunicorn.http.wsgi.FileWrapper at 0x90ce2cc>,
'wsgi.input': <gunicorn.http.body.Body object at 0x8ee61ec>,

'wsgi.multiprocess': True,
'wsgi.multithread': False,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 0)}>


Mauricio Mercado
Electronics Engineer
System Administrator - Python Developer

3165295908
Web : http://www.maumercado.com
Email : maume...@gmail.com

___________________
Cra 50 # 150 - 48
Colombia, Bogota D.C.

hynekcer

unread,
Apr 21, 2011, 5:10:27 PM4/21/11
to Satchmo developers
Hmm, I am not sure that you have read the second half of my previous
post.

1) I reported now a new issue
https://bitbucket.org/bkroeze/django-livesettings/issue/21/values-are-not-saved-in-the-database-in

It explains, why I asked you above to reset the cache before every new
test. This helps you to circumvent the first problem.

2) I wrote above about satchmo.log. There can be the key information
to the second problem.

3) I wrote above:
>> Upgrade livesettings to the version 1.4.8 or newer...
>> (no problem. They are backward compatible.)

Please, write if you can not or like not to follow something, but note
it. Some "help me, help me, headache" is not much helpful.

It wastes my time, if I should dive in an obsolete code fixed one year
ago, long before I got interested about Satchmo internals, although
those packages can be relative easily upgraded. ("backward compatible"
= upgrade is relative easy)

If you could to reproduce the problem with the tip satchmo or with a
new database or with a normal payment method, it would be easier.

What is your Django version?

Hmm. You can find it yourself with this logging patch, what violates
the unique constraint and when it was saved for the first time:

--- a/livesettings/models.py Mon Feb 28 12:50:28 2011 -0800
+++ b/livesettings/models.py Thu Apr 21 22:58:37 2011 +0200
@@ -121,6 +121,8 @@
except Site.DoesNotExist:
self.site = Site.objects.get_current()

+ log.debug('saving Setting: %s, force_insert=%s, ', \
+ 'force_update=%s' % (self.__dict__, force_insert,
force_update))
super(Setting, self).save(force_insert=force_insert,
force_update=force_update)

self.cache_set()


A few days I am going to be silent.

Merry Easter to all developers.
Reply all
Reply to author
Forward
0 new messages