On Tue, Aug 11, 2009 at 4:00 PM, hobi <[email protected]> wrote:

>
> The #satchmo irc channel helped me understand this, I was failing to
> understand the purpose of the site settings>product settings selection
> box, and also misunderstood the django admin panel workings.
>
> So the summary is this:
> 1.) The Product list in /admin/ will not contain your custom product,
> as Ryan Headley said above. It is possible to hack it in there, but
> neither elegant nor clean, thus not recommended.
> 2.) I misunderstood the purpose of this. See #3.
> 3.) The "Products list" in /admin/ doesn't change based on what you
> select in "site settings>product settings". I misunderstood the
> purpose for this selection box. I still don't fully understand why
> it's there, but I know what it does: it just informs satchmo that you
> have those types of products that you selected, so satchmo will check
> the tables for individual attributes of those types. I don't get how
> this is really useful, but I understand that you should just select it
> for each product type you will support.
>


Do you mean the list of available models at /admin/ under the heading
'Product'?

If so, the reason your custom model does not appear in that list is because
it is not part of the Product app. That's the way the Django admin works.
Each available model registered to the admin is available only under its own
app heading. It wouldn't make very much sense for models registered to the
admin to show up under anything other than their own app heading. And I'm
really not sure how you would even attempt to register a model to the admin
& cause it to show under the Product heading.

Now, that's not to say you can't pull it off with custom admin templates. It
just means there is no functionality provided in Django that will allow you
to register myApp.myModel to product.myModel ... registering doesn't work
that way, regardless of any settings you change in either Satchmo or your
Django project itself.

The purpose of /settings/ with regard to Product Settings is to inform
Satchmo about what configurable/extra Product-based models you want to be
available in your store. What this does functionally is allow you to select
said configurable products & when you create instances of the Product model,
you will be allowed to further extend that instance to any of the selected
configurable product types.

Hopefully, that makes a bit more sense.

As has been said in other threads, the current method of extending the
Product model is based on early Satchmo development that pre-dated Django's
now robust implementation of model inheritance. Model inheritance provides
you a much cleaner, extensible, and maintainable way to add custom product
types to your Satchmo store without having to go through all this headache
of registering custom product models via /settings/ and such. With model
inheritance, you are able to build out your own custom product types and
register them as standard Django models to the admin, and still have them
seen as 'native' Products, as Satchmo expects.

Best,

Bob

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