Satchmo on MacOsX

2 views
Skip to first unread message

Guilherme Zühlke O´Connor

unread,
Dec 18, 2007, 7:25:32 AM12/18/07
to Satchmo users
Hello everyone,

I am completely new to the django world but I came across with Satchmo
and found it very interesting for a project I'm working on so I
decided to give it a try.

I thought making it work would be quick and easy, but it has been a
pain for a couple of days already. After a lot of reading I decided to
first take a plunge on Django before installing Satchmo and now I have
a better base I turned to Satchmo again, but there are o couple of
things I can't get straight.

I don't understand the directory structure for the whole system. Which
files should reside where? Documentation refers to the Satchmo
directory, but AFAIK, one thing is the satchmo directory as an
application and another thing is the project including the Satchmo
application. Am I wrong?

Right now, I'm just trying to evaluate the tool, since it seems very
nice, and I'm installing it on my MacOsX Leopard using sqlite3 as
database and the internal light webserver to run it.

I'm not concerned with performace at all since is just evaluation at
this point, but I'm concerned in understand the project structure and
how to get it to work locally in the most straightforward possible
way, so I can start developing over it.

I'm sorry if my doubts sound silly, but I have very little python
background and only a week or so of Django experience and I need to
accomplish this installation in minimal time.

Guilherme Zühlke O´Connor

unread,
Dec 18, 2007, 7:30:21 AM12/18/07
to Satchmo users
I think I wrote too much on the previous message, so here is a
synthesis for those who don't want to read it all.

* I'm completely new to Django
* I need to perform a quick install of Satchmo on MacOSX Leopard for
evaluation purposes
* I don't fully understand the directory structure and how to create a
django project with Satchmo
* I can't afford to become a Dajngo developer and understand a lot of
common Django concepts before the installation, because we are still
evaluating the tool.

Any help is very welcome, thanks.

Bruce Kroeze

unread,
Dec 18, 2007, 11:59:01 AM12/18/07
to satchm...@googlegroups.com
I use OSX as my main development platform.

Step 1:

Install easy_install (search google for easy_install python)

Use easy_install to get most of the dependencies listed on the dependency page.  This can take a while and not all dependencies are going to be easy_install able.  Those that aren't, download them and install manually.

Step 2:

Put Django source somewhere, and Satchmo source somewhere else.  I use:

/opt/frameworks/django_src
/opt/frameworks/satchmo_src

Step 3:
Make symlinks to the source directories

cd /opt/frameworks
ln -s django_src/django .
ln -s satchmo_src/satchmo .

Step 4:

Add your base dir to the pythonpath

export PYTHONPATH=$PYTHONPATH:/opt/frameworks

Step 5:

Now, make a working directory for your store.  I like:

/opt/webapps/mystore

To make it, just go to /opt/webapps and type

/opt/frameworks/django/bin/django-admin.py startproject mystore

Step 6:

Copy settings-customize.py and local_settings- customize.py from the satchmo dir to your working directory, renaming so that they lose the "-customize" part.

Step 7:

Customize those files, then run "load_data.py"

Step 8:

Check out your new store

./manage.py runserver

Cliff Wells

unread,
Dec 18, 2007, 2:57:02 PM12/18/07
to satchm...@googlegroups.com

I don't know how helpful this is aside from offering encouragement, but
I had very little Django experience prior to using Satchmo (I'd
test-driven it once a couple years ago before choosing TurboGears
instead).

Just dive in and you'll probably find you'll have it up in an hour or
so.

Regards,
Cliff

Guilherme Zühlke O´Connor

unread,
Dec 18, 2007, 3:13:32 PM12/18/07
to Satchmo users
Cliff, thanks for the encouragement, in fact Bruce's mail is very
straightforward (thanks for that bruce, that guide should be on the
documentation).

I hadn't replied yet, because I'm implementing these guidelines. While
I hasn't finished, I have made good progress, with that in mind I
could understand fairly well how is Satchmo supposed to live on my
computer (the problem is that I'm trying to clean up the mess I did
before I understand it)

Bruce and Cliff, thanks again for the guide and support.

Guilherme Zühlke O´Connor

unread,
Dec 18, 2007, 4:00:27 PM12/18/07
to Satchmo users
Sorry to bother with more newbie questions. As I said before, I
managed to understand the satchmo strucutre, so I

* Installed django and satchmo somewhere in the PYTHONPATH (in fact,
that part was already done)
* Created a satchmo project under my user (/Users/guioconnor/Django/
mystore)
* Copied the settings files and customized them (mostly I changed only
the database information and language was left untouched with en-us)
* Copied tax and load_data to the root of my application: /Users/
guioconnor/Django/mystore (as described in step eight on both Bruce's
step-by-step guide and this doc: http://www.satchmoproject.com/trac/wiki/SatchmoInstallation)
* Then I tried to run ./load_data.py on that dir and I got this error
"ImportError: No module named encoding"

I tried to google around for an answer, but found none. Any ideas?
Maybe it is something that hasn't been properly cleaned from my
previous attempts. Here's the complete error log

[/Users/guioconnor/Django/mystore]$ ./load_data.py
Traceback (most recent call last):
File "./load_data.py", line 17, in <module>
from django.contrib.sites.models import Site
File "/Library/Python/2.5/site-packages/django/contrib/sites/
models.py", line 9, in <module>
class Site(models.Model):
File "/Library/Python/2.5/site-packages/django/db/models/base.py",
line 30, in __new__
new_class.add_to_class('_meta', Options(attrs.pop('Meta', None)))
File "/Library/Python/2.5/site-packages/django/db/models/base.py",
line 169, in add_to_class
value.contribute_to_class(cls, name)
File "/Library/Python/2.5/site-packages/django/db/models/
options.py", line 53, in contribute_to_class
setattr(self, 'verbose_name_plural',
meta_attrs.pop('verbose_name_plural', self.verbose_name + 's'))
File "/Library/Python/2.5/site-packages/django/utils/functional.py",
line 42, in __wrapper__
res = self.__func(*self.__args, **self.__kw)
File "/Library/Python/2.5/site-packages/django/utils/translation/
trans_real.py", line 268, in gettext
_default = translation(settings.LANGUAGE_CODE)
File "/Library/Python/2.5/site-packages/django/utils/translation/
trans_real.py", line 197, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "/Library/Python/2.5/site-packages/django/utils/translation/
trans_real.py", line 180, in _fetch
app = getattr(__import__(appname[:p], {}, {}, [appname[p+1:]]),
appname[p+1:])
File "/Library/Python/2.5/site-packages/satchmo/caching/
__init__.py", line 5, in <module>
from django.utils.encoding import smart_str
ImportError: No module named encoding

Chris Moffitt

unread,
Dec 18, 2007, 4:50:22 PM12/18/07
to satchm...@googlegroups.com
Can you double check what version of Django you're running?  It looks like you're having trouble importing smart_str which was added to trunk a while ago.

What do you see if you do something like this:

> python
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> django.get_version()
0.97-pre-SVN-6897


-Chris

Guilherme Zühlke O´Connor

unread,
Dec 18, 2007, 5:11:07 PM12/18/07
to Satchmo users
I think I'm in more trouble than I thought, but I know I have
installed the 0.96 version, which is the last .tar.gz available.

$ python
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> django.get_version()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'get_version'

Guilherme Zühlke O´Connor

unread,
Dec 18, 2007, 5:13:19 PM12/18/07
to Satchmo users
Here is the version

$ python
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> django.VERSION
(0, 96.099999999999994, None)
>>>


On Dec 18, 11:11 pm, "Guilherme Zühlke O´Connor"

Guilherme Zühlke O´Connor

unread,
Dec 18, 2007, 6:17:06 PM12/18/07
to Satchmo users
Well, I have installed the development version of Django and it
worked. I still have a

raise TemplateDoesNotExist, name
TemplateDoesNotExist: 404.html

But this is because my installation is all messed up because if my
failed trials. I'd better get some sleep and start fresh tomorrow, so
I have a decent installation.

Thanks everyone for being so helpful and if I may, I'd like to suggest
the inclusion of a straight tutorial like Bruce's on the
documentation, along with a paragraph or two with the explanation of
the directory structure.

Guilherme

Chris Moffitt

unread,
Dec 18, 2007, 11:06:37 PM12/18/07
to satchm...@googlegroups.com
You will need the latest svn development version as described here -
http://www.djangoproject.com/download/

-Chris

Reply all
Reply to author
Forward
0 new messages