Ok I figured it out. I needed to import Product from 
oscar.apps.catalogue.models instead of AbstractProduct

On Friday, October 23, 2020 at 4:11:23 PM UTC+4 Josh Karamuth wrote:

>
> I'm trying to translate products and categories using modeltranslation but 
> I can't figure out how to set it up.
>
> I forked the *catalogue* app and created *translation.py* inside the 
> *ecommerce 
> *(directory to hold my forks) directory with the following contents:
>
>
> from modeltranslation.translator import translator, TranslationOptions
>
> from oscar.apps.catalogue.abstract_models import AbstractProduct
>
>
> class AbstractProductTranslationOptions(TranslationOptions):
> fields = ("title", "slug", "description")
>
>
>
>
> translator.register(AbstractProduct, AbstractProductTranslationOptions)
>
> I then add ecommerce.catalogue.apps.CatalogueConfig to INSTALLED_APPS and 
> remove* oscar.apps.catalogue.apps.CatalogueConfig*
>
> But when I run migrations, nothing happens.
>
> Does anyone know what I'm doing wrong?
>

-- 
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 on the web, visit 
https://groups.google.com/d/msgid/django-oscar/dfb5797e-bd16-47ac-bf4b-ffdde9fbd7edn%40googlegroups.com.

Reply via email to