Easily "upgrading" satchmo while keeping local edits

0 views
Skip to first unread message

primitive

unread,
Jan 1, 2008, 4:23:01 PM1/1/08
to Satchmo users
Hi all,

I want to keep my local copy of satchmo in sync with the online
version. I know this is easy with SVN, however, I routinely modify
templates and views while maintaining a local SVN of my project. How
can I keep satchmo up to date while still be able to keep my local SVN
and any edits I make?

Currently, I work directly within the satchmo distro which is pointed
to by a ".pth" file, I was thinking maybe I could have the satchmo
checkout in my site-packages directory, and have a separate directory
for my project, but the issue with this is that I think (I started
doing this but stopped half way) if I modify any view/model/template,
I would have to add that to my settings file and possibly remove the
existing one? I know this should be a common issue, and the solution
may be simple, but it is escaping me at the moment.

Any help would be appreciated.

Chris Moffitt

unread,
Jan 2, 2008, 5:24:52 PM1/2/08
to satchm...@googlegroups.com
I want to keep my local copy of satchmo in sync with the online
version. I know this is easy with SVN, however, I routinely modify
templates and views while maintaining a local SVN of my project. How
can I keep satchmo up to date while still be able to keep my local SVN
and any edits I make?

One of the easiest ways is to copy the satchmo template directory files to a new location and point to that in your settings file (via the TEMPLATE_DIRS variable.  You'll then be able to modify the templates and when you sync to svn, you will need to do a diff to see if anything of interest changes.

Now, changing your models is a little more difficult.  I'm not sure of a really good way to handle this.  I personally don't know of a really elegant solution.  I'm curious too if others have successfully developed anything.

-Chris


Bruce Kroeze

unread,
Jan 2, 2008, 5:58:58 PM1/2/08
to satchm...@googlegroups.com
Luckily, he wasn't asking about changing models, because that gets more hairy.  :)

Templates - just do like Chris said.

Views - override by making your own view and then put it in the local_settings file.

For example, if I wanted to override ... say account history
--
# These can override or add to the default URLs
from django.conf.urls.defaults import *
URLS = patterns('',
 (r'^accounts/history/', ' mysite.views.custom_order_history', {}, 'satchmo_order_history'),
)

primitive

unread,
Jan 2, 2008, 6:12:55 PM1/2/08
to Satchmo users
Thanks guys,

I tried it out (for templates, haven't tried the views yet), and it
works for now. In the future I might(most likely) have to add/modify
several models, but already I can think of a way to get around this,
by just creating another "app" since my models will be different
enough to warrant that, and if their not, just do the same for that
model as I did for the templates. Thanks again for your help, if
anybody else has any other unique ways around this, please post.
Reply all
Reply to author
Forward
0 new messages