its dashboard/catalogue/forms.py On Thursday, November 14, 2024 at 5:54:28 PM UTC Aaron Jack wrote:
> I think the idea is to have 1 product model, then multiple product classes > inside oscar, to define different types of products, i.e. t shirts, cd's, > dvd's > > To add the custom field on the product model to the oscar dashboard you > need to fork the dashboard app and in catalogue.forms.py add something > like this: > > > class ProductForm(base_forms.ProductForm): > class Meta(base_forms.ProductForm.Meta): > model = Product > fields = [ > "title", > "upc", > "description", > # "video_url", # Uncomment this if you want to include video_url > "is_public", > "is_discountable", > "structure", > "slug", > "meta_title", > "meta_description", > ] > > damn formatting! > > On Wednesday, November 13, 2024 at 3:31:51 PM UTC Hugo wrote: > >> I see in the guide: >> >> Suppose you want to add a video_url field to the core product model. >> ... >> Next, you can modify the Product model through subclassing: >> # yourproject/catalogue/models.py >> from django.db import models >> from oscar.apps.catalogue.abstract_models import AbstractProduct >> >> class Product(AbstractProduct): >> video_url = models.URLField() >> >> from oscar.apps.catalogue.models import * >> >> I have some questions, >> First, is that I tried it, and don't see the 'video_url' in the product, >> so, something left in the doucmentation. >> And my other questions is, can't I create other classes, like >> DigitalProduct? >> >> -- https://github.com/django-oscar/django-oscar http://django-oscar.readthedocs.org/en/latest/ --- You received this message because you are subscribed to the Google Groups "django-oscar" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-oscar+unsubscr...@googlegroups.com. To view this discussion, visit https://groups.google.com/d/msgid/django-oscar/e903b928-eee8-42bc-a8cd-9e55d17cb0e4n%40googlegroups.com.