I recommend to use Django shell and try to import all your new classes
   python manage.py shell
   >>> from ... import ...
becase the reason of NoReverseMatch error is very often that a view
can not be imported

I am afraid that you can not use
    admin.site.register(Product, SoftwareOptions)

    admin.site.register(SoftwareProduct, SoftwareOptions)
('SoftwareProduct' is the name of your descendant of Product, for me
unknown yet.)
because some fields are not known for pure Product, but only for a
descendant.

Subtypes are ment only those in product.modules (configurable, custom,
downloadable, subscription).


Does that help? (The more you explain, the more appears unknown so
far.)


On Apr 28, 9:31 pm, hunter <[email protected]> wrote:
> Ahh, terribly sorry about that!
> It was the end of the day and I was frustrated:)
>
> 'myapp_software_change' is the parameter the reverse call is referring
> to and it is really 'laureate_software_change'. It is a custom product
> module because I need a few extra fields on the default satchmo
> Product and want them to show up in the admin as an inline.
>
> When navigating to the product detail page ( /admin/product/product/
> 23/ ) I get the NoReverseMatch Error which is coming from the
> edit_subtypes template tag. That function builds an URL from a reverse
> call based on the appname and model if they are found.
>
> Where I need help or guidance is if my product subtype is coming up in
> the product.get_subtypes() call and it passes through the 'if subtype
> in subtypes:' test then fails at the reverse.
>
> Does that help?
>
> here is my admin.py from the custom product module:
>
> from django.contrib import admin
> from product.models import Product
> from laureate.models import Software
> from livesettings import config_value
> from product.admin import ProductAttribute_Inline, Price_Inline, \
>     ProductImage_Inline, ProductTranslation_Inline, ProductOptions
>
> class SoftwareProduct_Inline(admin.StackedInline):
>     model = Software
>     extra = 1
>
> admin.site.unregister(Product)
>
> class SoftwareOptions(ProductOptions):
>     exclude = ('slug', 'length', 'length_units',
>                'width', 'width_units', 'height', 'height_units',
>                'weight_units',  'also_purchased',
>                'date_added', 'taxable', 'taxClass', 'shipclass',
>                )
>
>     fieldsets = (
>         (None, {'fields': ('site', 'name', 'sku', 'category',
> 'description',
>         'short_description', 'weight', 'meta', 'active', 'featured',
> 'related_items',
>         'items_in_stock', 'total_sold','ordering',)}),
>         )
>
>     list_display = ('name', 'items_in_stock', 'unit_price',
> 'active','featured', 'get_subtypes')
>     list_display_links = ('name',)
>     search_fields = ['name', 'description', 'short_description']
>     inlines = [SoftwareProduct_Inline, Price_Inline,
> ProductImage_Inline]
>     filter_horizontal = ('category',)
>
> admin.site.register(Product, SoftwareOptions)
>
> On Apr 27, 4:16 pm, hynekcer <[email protected]> wrote:
>
> > Nobody can help you probably, if you do not provide information about
> > what is 'myapp_software_change' or 'myapp_software', where you use it
> > and what are you doing, when you see this error message.
> > The name 'myapp' is nowhere used in Satchmo!
>
> > On 26 dub, 22:57, hunter <[email protected]> wrote:
>
> > > I'm getting the 'Caught NoReverseMatch while rendering: Reverse for
> > > 'myapp_software_change' with arguments '(3,)' and keyword arguments
> > > '{}' not found.'
>
> > > I'm a little confused here since I *think* I have the subtype set up
> > > properly as per the documentation (on the site). I should be seeing
> > > the Product edit page and my Inline.
>
> > > I'm using satchmo 0.9.2-pre w/ Postgres and updated livesettings.
>
> > > Any help/insight would be 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