How do I add an additional field to django-oscar dashboard? I've forked catalog app added an extra field, but the form is not showing after forking dashboard.
from django.db import models
from oscar.apps.catalogue.abstract_models import AbstractProduct
class Product(AbstractProduct):
file = models.FileField(upload_to='files/%Y/%m/%d')
from oscar.apps.catalogue.models import *
dashboard/catalogue/forms.py
from oscar.apps.dashboard.catalogue import forms as base_forms
class ProductForm(base_forms.ProductForm):
class Meta(base_forms.ProductForm.Meta):
fields = ('file',)
First, create a directory to hold the forked app
example forked_app_dir
next use oscar_fork_app
utility (which is very very poorly documented when you want to fork the dashboard apps)
in my case, I wanted to fork the catalogue dashboard app so I did ./manage.py oscar_fork_app
dashboard then changed into the dashboard directory and did ./manage.py oscar_fork_app catalogue_dashboard
which created another dashboard dir which I removed and everything worked fine after applying changes forms in the dashboard.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With