File "/home/wigo/.virtualenvs/oskarek/local/lib/python2.7/site-packages/django/apps/registry.py", line 221, in register_model
(model_name, app_label, app_models[model_name], model))
RuntimeError: Conflicting 'condition' models in application 'offer': <class 'oscar.apps.offer.models.Condition'> and <class 'oskarek.offer.models.Condition'>.
from oscar.apps.offer.models import Condition as OscarCondition
class Condition(OscarCondition): pass
I have also tried other ways of extending non abstract models, given in this thread: https://groups.google.com/forum/#!topic/django-oscar/8W_Rmwk6wiUAny way produces error given above.Please, help.Wieslaw. :)
from oscar.core.loading import get_model
# from oscar.apps.offer.models import Range, Condition, Benefit
Benefit = get_model('offer', 'Benefit')
Range = get_model('offer', 'Range')
Condition = get_model('catalogue', 'Condition')
from oscar.core.loading import get_model
# from oscar.apps.offer.models import ConditionalOffer, Range
ConditionalOffer = get_model('offer', 'ConditionalOffer')
Range = get_model('offer', 'Range')
Product = get_model('catalogue', 'Product')
as OscarCondition
from django.db.models.loading import get_model
OscarCondition = get_model('offer', 'Condition')
class Condition(OscarCondition):
pass
django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.
Hi Luca,I created fork of Oscar 1.0.2 and changed two files in offer app:
In your case, did you end up disabling loading for Oscar views, or did you create fork of Oscar and changed way of importing?
I'll try to dig and see if I can make it work again and eventually send a PR.
Nevermind: it looks like something is already going on:
--
https://github.com/tangentlabs/django-oscar
http://django-oscar.readthedocs.org/en/latest/
https://twitter.com/django_oscar
---
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...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-oscar.
To view this discussion on the web, visit https://groups.google.com/d/msgid/django-oscar/d5e5e091-0141-41ac-b053-3f0b45e01ed9%40googlegroups.com.