I'm posting here for two reasons to let people know my experiences with Satchmo with Django 1.8 LTS and to get a sanity check that what I have done to get it to work is sensible as I don't fully understand what the consequences may be.
Starting with the latest bitbucket version of Satchmo (after commit
a784ed7) I installed it with Django 1.8. I ran into several minor issues which I seem to have overcome but wanted to check that what I have done to fix these issues is sensible.
I used the latest versions when I installed with pip except for app_plugins which I will come to later.
The first issue was that I got an error message, Application labels aren't unique, duplicates: thumbnail. In INSTALLED_APPS I had both 'sorl.thumbnail' and #satchmo_utils.thumbnail' I don't think I use 'satchmo_utils.thumbnail' so I commented it out.
The next issue I came to was when i ran syncdb I got the error livesettings.models.SettingNotSet: ("Startup error, couldn't load PAYMENT_PAYPAL.KEY", None). I also got it for PAYMENT_GIFTCERTIFICATE and PAYMENT_DUMMY if I used these instead. So I added:
LIVESETTINGS_OPTIONS = \
{ 1L: { 'DB': False,
'SETTINGS': { u'PAYMENT_DUMMY': { u'CREDITCHOICES': u'["Visa", "Mastercard", "Discover", "American Express"]',
u'LIVE': u'True'},
u'PAYMENT_GIFTCERTIFICATE': { u'LIVE': u'True'},
u'PAYMENT_PAYPAL': { u'BUSINESS': u'xxx',
u'BUSINESS_TEST': u'xxx',
u'CURRENCY_CODE': u'GBP'},
u'SHOP': { u'REQUIRED_BILLING_DATA': u'["email", "first_name", "last_name", "phone", "street1", "city", "postal_code", "country"]',
u'REQUIRED_SHIPPING_DATA': u'["addressee", "street1", "city", "postal_code", "country"]'}}}}
to my settings.py. Syncdb worked I commented the LIVESETTINGS_OPTIONS out and ran syncdb again and it still worked.
The final issue was with app_plugins. I ran into an error "TemplateSyntaxError at / 'app_plugins' is not a valid tag library: ImportError raised loading app_plugins.templatetags.app_plugins: cannot import name CacheClass. A bit of Googling
https://docs.djangoproject.com/es/1.9/releases/1.8/ says "The
CacheClass
shim has been removed from all cache backends.
These aliases were provided for backwards compatibility with Django 1.3.
If you are still using them, please update your project to use the real
class name found in the
BACKEND
key of the
CACHES
setting."
So I cloned ssh://
h...@bitbucket.org/bkroeze/django-caching-app-plugins and copied the app_plugins directory to my project directory, edited app_plugins.py commenting out the offending line and adding a new one like this:
#from django.core.cache.backends.locmem import CacheClass as LocalMemCache
from django.core.cache.backends.memcached import MemcachedCache as LocalMemCache
Then I ran into an error "AttributeError at / 'Template' object has no attribute 'nodelist'.
Googling it again I found I could (but I don't really understand what I am doing) update the function inclusion_kwdtag in app_plugins.py commenting out a line and adding a line like this:
def inclusion_kwdtag(register, file_name, context_class=Context,
takes_context=False):
def dec(func):
class InclusionKwdNode(Node):
def __init__(self, vars_to_resolve):
self.vars_to_resolve = map(Variable, vars_to_resolve)
def render(self, context):
new_context = callback(func, self.vars_to_resolve, context,
takes_context)
if not getattr(self, 'nodelist', False):
if (not isinstance(file_name, basestring) and
is_iterable(file_name)):
t = loader.select_template(file_name)
else:
#t = loader.get_template(file_name)
#added line
t = context.template.engine.get_template(file_name)
Now everything seems to work although I still have further testing to do. However I would appreciate it if someone who understands this better can clarify if I have done anything stupid or not.