<s> from django . contrib import admin <EOL> from django . utils . translation import ugettext_lazy as _ <EOL> from product . admin import ProductOptions <EOL> from product . models import Product <EOL> from satchmo_ext . tieredpricing . models import TieredPrice , PricingTier <EOL> from product . admin import Price_Inline <EOL> class TieredPriceInline ( admin . TabularInline ) : <EOL> model = TieredPrice <EOL> extra = <NUM_LIT:2> <EOL> verbose_name = _ ( "<STR_LIT>" ) <EOL> verbose_name_plural = _ ( "<STR_LIT>" ) <EOL> class PricingTierOptions ( admin . ModelAdmin ) : <EOL> pass <EOL> admin . site . register ( PricingTier , PricingTierOptions ) <EOL> admin . site . unregister ( Product ) <EOL> ix = <NUM_LIT:0> <EOL> while ix < len ( ProductOptions . inlines ) : <EOL> if ProductOptions . inlines [ ix ] == Price_Inline : <EOL> ProductOptions . inlines . insert ( ix + <NUM_LIT:1> , TieredPriceInline ) <EOL> ix += <NUM_LIT:1> <EOL> admin . site . register ( Product , ProductOptions ) </s>
