I have a model Product
and model Price
. The Price
has a ForeignKey(Product...)
and original_price
and eur_price
which are MoneyField
's (Django-money). So one Product
object can have multiple Price
objects related.
I tried to inline the Price
objects into Product
model admin which works correctly, but when I set original_price and eur_price to be readonly_fields
, it shows amounts but not currencies.
This is without making them readonly
:
class PriceInline(admin.TabularInline):
model = Price
max_num = 10
#readonly_fields = ('original_price','eur_price')
class ProductAdmin(admin.ModelAdmin):
inlines = [ScanInline,]
And this with readonly:
class PriceInline(admin.TabularInline):
model = Price
max_num = 10
readonly_fields = ('original_price','eur_price')
class ProductAdmin(admin.ModelAdmin):
inlines = [ScanInline,]
Do you have any idea how to show currency there if those fields are readonly?