post some code, lets see whats going on! :)

On Tuesday, November 19, 2024 at 8:13:32 AM UTC Hugo wrote:

>
> Maybe I don't put it in the correct place, but I don't see the new field. 
> I only see them if I add it to ProductAttribute. But I need to create 
> Signal handler to create the travel product class after migrations. And I 
> don't know if its a good way to proceed.
> El jueves, 14 de noviembre de 2024 a las 18:55:39 UTC+1, Aaron Jack 
> escribió:
>
>> 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/ecbe0f84-6636-4c6f-826e-21b1182ce188n%40googlegroups.com.

Reply via email to