You are technically correct, that you could modify the Satchmo models.
However, that way will probably lead to more pain and misery in the future -
when you try to sync up with the latest Satchmo release.

My recommendation would be to create a separate model in your project that
associates options and images. Then in your templates (probably via a custom
template tag) pull together the image and the product to display in your
jquery effect.

There may be slightly more complicated but it will be much easier to
maintain and upgrade going forward.

Others in the group may have some other creative ideas but I think it's safe
to say that you should always try to resist the temptation to modify the
model files directly. Extending is almost always preferable.

-Chris

On Mon, Jul 13, 2009 at 11:29 AM, Jonathan Biddle <[email protected]> wrote:

>
> I'm building my first Satchmo site, and I was looking for some input
> on how best to go about overriding the ProductImage model.
>
> The change I'm making to the model is pretty simple: Adding an
> optional ForeignKey field to the Options model so an image can be
> associated with an option (This is surfaced in the template for a
> jQuery effect).
>
> My current solution was to just alter the model directly in the
> Satchmo package, but I'm thinking there must be a better way of going
> about this.  Any advice would be greatly appreciated!
>
> >
>

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