Adding a display column in admin -> Product -> Option Groups

14 views
Skip to first unread message

Thomas

unread,
Apr 24, 2012, 1:58:12 AM4/24/12
to satchm...@googlegroups.com
Hi,

I would like to add a third column in the admin view for Product -> Option Groups
Currently there are two columns: 'Site' and 'Name of Option Group'
(It is the admin page where it says 'Select Option Group to change'

The column I want to add is 'Detailed Description'. ie the 'description' field from the model.

I have done this by modifying the satchmo source, but obviously that is not the preferred way to do it.

Here is what I changed: In src/satchmo/satchmo/apps/product/admin.py I added the following line to
 class OptionGroupOptions(admin.ModelAdmin):

     list_display += ('description',)

Is it possible to do this without changing the original Satchmo source?

Many thanks,
Thomas

Chris Moffitt

unread,
Apr 24, 2012, 10:24:46 AM4/24/12
to satchm...@googlegroups.com
You want to use admin.site.unregister to unregister the existing admin models and register your new model with the additional fields.
 
 
 
-Chris

--
You received this message because you are subscribed to the Google Groups "Satchmo users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/satchmo-users/-/W4G7eBzy7bMJ.
To post to this group, send email to satchm...@googlegroups.com.
To unsubscribe from this group, send email to satchmo-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.

Reply all
Reply to author
Forward
0 new messages