You have a slightly old version of threaded_multihost. This can be the cause.
I have heared that is useful only for sites with the same owner and if you want only to use only different templates, to enable different sets of categories and products but most of things are common (database and settings.py) and you want to save the memory because sites are served by the same processes. Most of people do not use it, I think except Bruce - the author. It is useful to have a default site with primary key ID = 1. Even if you delete a site record in the database and create a new, it is easier have again one of sites with ID = 1. At least before you set up all correct, it is a safety catch. Domain names should be set correct in the database table Sites. If you use DEBUG = True, domain names are simulated and taken from THREADED_MULTIHOST_SETTINGS['DEBUG_DOMAIN'] variable or taken some default. You shoudl read the function threaded_multihost.sites.by_host and ...threadlocal_settings.get_threadlocal_setting if you want use DEBUG I think it is useful to start with real two domains and local semi- production site protected by a firewall for the first experiments. Start with the same templates and demo shop, create records for the second site in the db admin and select only different active products and different site names to verify that it works. (That's all what I tested a year ago.) - Then google more info (Bruce's blog and some discussion) for DEBUG mode and some tricks described by Bruce. > I recently installed satchmo Hmm... It is for a more expirienced user. It would be nice if you later share some positive results. Hynek On 13 lis, 08:09, nakamoto <[email protected]> wrote: > I recently installed satchmo (0.92) test shops on my local machine ( Ubuntu > 11.10, python2.7, django 1.2.7 ). > I followed "installation guide > (http://www.satchmoproject.com/docs/dev/new_installation.html)" and I could > make the simple shop work. > > Whenever I set MULTISHOP = True, however, Site.objects.get_current() is > invoked and returns None, then crashes: > > Traceback: > File > "/home/nakamoto/venv/django12/local/lib/python2.7/site-packages/django/core/handlers/base.py" > in get_response > 100. response = callback(request, *callback_args, > **callback_kwargs) > File > "/home/nakamoto/venv/django12/local/lib/python2.7/site-packages/Satchmo-0.9.2-py2.7.egg/satchmo_store/shop/views/home.py" > in home > 17. featured = display_featured() > File > "/home/nakamoto/venv/django12/local/lib/python2.7/site-packages/Satchmo-0.9.2-py2.7.egg/product/views/__init__.py" > in display_featured > 93. q = Product.objects.featured_by_site() > File > "/home/nakamoto/venv/django12/local/lib/python2.7/site-packages/Satchmo-0.9.2-py2.7.egg/product/models.py" > in featured_by_site > 808. return self.by_site(site=site, active=True, featured=True, > **kwargs) > File > "/home/nakamoto/venv/django12/local/lib/python2.7/site-packages/Satchmo-0.9.2-py2.7.egg/product/models.py" > in by_site > 798. site = Site.objects.get_current() > File > "/home/nakamoto/venv/django12/local/lib/python2.7/site-packages/threaded_multihost/multihost_patch.py" > in site_get_current > 9. return sites.by_host() > File > "/home/nakamoto/venv/django12/local/lib/python2.7/site-packages/threaded_multihost/sites.py" > in by_host > 73. parts = raw.split('=') > > Exception Type: AttributeError at / > Exception Value: 'NoneType' object has no attribute 'split' > > Is there anything I have to change or install to "MULTISHOP = True" > configuration work ? -- 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.
