I am trying to customize StockRecordForm in django-oscar administration. What I have:
- Forked dashboardapp, alsocatalogue_dashboard
- Included new StockRecordattribute inmodels.py
- Updated forms.pylike this:
from oscar.apps.dashboard.catalogue import forms as base_forms
class StockRecordForm(base_forms.StockRecordForm):
    class Meta(base_forms.StockRecordForm.Meta):
        fields = [
            'partner', 'partner_sku',
            'price_currency', 'price',
            'num_in_stock', 'low_stock_threshold', 'new_attribute',
        ]
Part of my INSTALLED_APPS looks like this:
#'oscar.apps.dashboard.apps.DashboardConfig', #'oscar.apps.dashboard.catalogue.apps.CatalogueDashboardConfig', 'mikeapps.dashboard.apps.DashboardConfig', 'mikeapps.dashboard.catalogue.apps.CatalogueDashboardConfig',
But modification is not showing up. Is there anything else I should modify?
Advertisement
Answer
Allright, I am surprised that in this case I have to actually modify template to show the new fields (unlike ProductForm etc.), I presumpted that all chosen attributes will be shown in forms automatically, but I was wrong.