Satchmo on Heroku?

61 views
Skip to first unread message

Joe K

unread,
Jan 11, 2012, 1:26:30 PM1/11/12
to Satchmo users
Has anyone had any success (or failure) with deploying Satchmo on
Heroku?

I'm getting ready to try, and would just like to know of any pitfalls
or gotchas, tips or tricks.

Thanks in advance!

Joe K

ionic drive

unread,
Jan 14, 2012, 11:27:04 AM1/14/12
to satchm...@googlegroups.com
Hello Satchmo-Friends,

how do you perform bulk actions such as:
----------------------------------------
*quick price changes on a bunch of products.
*deleting multiple products at once.

without having to open each product item in admin area.

Thanks in advance
ionic

Laszlo Antal

unread,
Jan 14, 2012, 12:01:15 PM1/14/12
to satchm...@googlegroups.com, satchm...@googlegroups.com
Hi,

I never delete a product since that would affect order history. What I do is replace the default admin class for Product and add a new action that sets active to False. This allow me to tick the checkmark on any of the product and update them. As for price I have list_editable for the price admin which allows me to edit price on the list_change page.
I also added that for the product for inventory that gives an easy way to update.

Hope it helps

lzantal

> --
> You received this message because you are subscribed to the Google Groups "Satchmo users" group.
> 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.
>

ionic drive

unread,
Jan 14, 2012, 12:17:38 PM1/14/12
to satchm...@googlegroups.com
Thank you lzantal,

I was thinking about a solution similar to yours.
Thank you very much!
I will do exactly as you mentioned.

Best wishes
ionic

mister wong

unread,
Jan 15, 2012, 8:31:47 AM1/15/12
to satchm...@googlegroups.com
hello Lazlo and friends,

what I have done so fare:
1)
(searching the web ;-) )

2)
added to:
class ProductOptions(admin.ModelAdmin):
     ...
     list_editable('item_in_stock', )

this works great for updating item_in_stock in the list.
 
But
3)
how can the same effect be achieved on 'unit_price' as unit_price is not on the Product-model.

This is not working:
list_editable('item_in_stock', 'unit_price')
the error message is:
'ProductOption.list_editable[1]' refers to a field, 'unit_price', not defined on Product.

Please teach me the proper location to make 'unit_price' editable.

Thank you in advance!
ionic

hynekcer

unread,
Jan 15, 2012, 5:49:33 PM1/15/12
to Satchmo users
I think that it requires sometimes to write a view. Imagine that you
have a price valid until today and you want to edit prices which will
be valid tomorow. You need to write a filter, which unit_price you
really want to edit.

ionic drive

unread,
Jan 16, 2012, 4:10:35 AM1/16/12
to satchm...@googlegroups.com
sorry to all about this mess.
I have pressed the reply button and changed the topic. I thought this will create a new topic.
I promise to write directly to satchmo-users email address in the future.
Sorry!

@hynekcer,
thank you again for the input and help!
Have to rethink my strategy.
Izantal was writing that he is doing similar stuff, maybe he can teach me how to do it correctly.

Best wishes
ionic

lzantal

unread,
Jan 16, 2012, 6:02:25 PM1/16/12
to satchm...@googlegroups.com
Hi,

Sorry for the late reply, very busy weekend.
Here is my code to bulk update price. Please add this into any of your app models.py and admin.py
I have an app called storeoptions where I stick all these in.
Here is the model, I create a proxy class for it so I can easily define the ordering and other customization.
"""
class PriceUpdate(Price):
class Meta:
proxy = True
ordering = ['product','expires']
"""

Here is the admin class
"""
class PriceUpdateAdmin(admin.ModelAdmin):
list_display = ['product','price','quantity','expires']
list_editable = ['price','expires','quantity']
search_fields = ['product__name','product__sku']

admin.site.register(PriceUpdate, PriceUpdateAdmin)
"""

That's all. once you have that you will be able to bulk edit the price for your products

Hope it helps


lzantal

ionic drive

unread,
Jan 17, 2012, 1:43:13 AM1/17/12
to satchm...@googlegroups.com
thank you very much lzantal!

I am sure this will help.
ionic

Johnny Saucedo

unread,
May 29, 2012, 11:48:44 AM5/29/12
to satchm...@googlegroups.com
Joe, did you ever find out if you can deploy satchmo on heroku? 
Reply all
Reply to author
Forward
0 new messages