> Is it possible that you are loading the values from livesettings when
> the module is loaded, rather than dynamically at process-time?  That
> would explain it.
>
> ---
> Bruce Kroeze http://www.ecomsmith.com

Where is the edge between loading and process-time? There are no
models.py files in the payment module which usually have database-
sensitive information. Does loading of a urls.py belong to the loading
time or is it already a part of a process-time? What about loading
views then?

For example, the urls of the payment module, I was working on, is like
this:

from django.conf.urls.defaults import *
from livesettings import config_value, config_get_group
from views import confirm_info, pending

config = config_get_group('PAYMENT')

urlpatterns = patterns('',
     (r"^$", confirm_info, {'SSL': config.SSL.value},
"PAYPALEXPRESS_satchmo_checkout-step2"),
     (r"^success/$", 'payment.views.checkout.success', {'SSL':
config.SSL.value}, "PAYPALEXPRESS_satchmo_checkout-success"),
     (r"^pending/$", pending, {'SSL': config.SSL.value},
"PAYPALEXPRESS_satchmo_checkout-pending"),
     (r"^ipn/$", include("paypal.standard.ipn.urls")),
     )

As you can see, SSL value is read from livesettings immediately when
loading. The same is done in the core Satchmo payment modules. The
only difference is that I am also importing the views, but not
defining a path to the views in strings, because I don't want to
hardcode the full path to the module inside of the module.

BTW, is there any difference between config_get_group
("PAYMENT").SSL.value and config_value("PAYMENT", "SSL")?

Locally for development I am using
CACHE_BACKEND = "locmem:///"
The loading of livesettings started working correctly when I changed
config = config_get_group('PAYMENT_PAYPALEXPRESS')
to
config = config_get_group('PAYMENT')
in urls.py of the payment module. Both have "SSL" as a Boolean
setting.

Are there any livesettings that are required by all payment modules?
Are settings like "KEY", "MODULE", or "LABEL" used anywhere?

---
Aidas

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