Broken example in Django 1.2.3

105 views
Skip to first unread message

Uznick

unread,
Sep 14, 2010, 7:15:07 AM9/14/10
to eav-django
Hi.

Example in README:

from django.db import models
from eav.models import BaseEntity, BaseSchema, BaseAttribute

class Fruit(BaseEntity):
title = models.CharField(max_length=50)

is broken and raises exception

Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/
Django-1.2.3-py2.7.egg/django/db/models/base.py", line 48, in __new__
kwargs = {"app_label": model_module.__name__.split('.')[-2]}
IndexError: list index out of range

Andy Mikhaylenko

unread,
Sep 16, 2010, 1:13:50 PM9/16/10
to eav-django
Hi,
please check the latest version of EAV-Django (1.3.3) and the bundled
example ("grocery shop"). Does it work for you? Note that it comes
with a fixture.

Evgeny V. Generalov

unread,
Oct 15, 2010, 2:49:48 AM10/15/10
to eav-django
The eav-django is not fully compatible with django-1.2.3 due
http://code.djangoproject.com/ticket/14471

On Sep 16, 11:13 pm, Andy Mikhaylenko <a...@neithere.net> wrote:
> Hi,
> please check the latest version of EAV-Django (1.3.3) and the bundled
> example ("grocery shop"). Does it work for you? Note that it comes
> with a fixture.
>
> On 14 ÓÅÎ, 17:15, Uznick <uzn...@gmail.com> wrote:
>
> > Hi.
>
> > Example in README:
>
> > šfrom django.db import models
> > šfrom eav.models import BaseEntity, BaseSchema, BaseAttribute
>
> > class Fruit(BaseEntity):
> > š štitle = models.CharField(max_length=50)
>
> > is broken and raises exception
>
> > Traceback (most recent call last):
> > š File "<console>", line 1, in <module>
> > š File "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/
> > Django-1.2.3-py2.7.egg/django/db/models/base.py", line 48, in __new__
> > š š kwargs = {"app_label": model_module.__name__.split('.')[-2]}

Cek

unread,
Nov 16, 2010, 2:33:26 PM11/16/10
to eav-django
The ticket is "closed: fixed", and there is a backport for 1.2.x,
but I still can't get it to run.

My models (from the fruit example) won't validate, with message:
Error: One or more models did not validate:
base.attr: "unique_together" refers to choice, a field that doesn't
exist. Check your syntax.

(base is my app's name)

Has anyone been more lucky on django 1.2.3?



On Oct 15, 7:49 am, "Evgeny V. Generalov" <e.genera...@gmail.com>
wrote:
> The eav-django is not fully compatible with django-1.2.3 duehttp://code.djangoproject.com/ticket/14471

Cek

unread,
Nov 17, 2010, 2:59:46 AM11/17/10
to eav-django
Oh nvm, it's alive!

I just didn't notice the difference between the models in bundeled
example and models on project page :-/

It works just fine now, thanks Andy for this addon, it's great!
Reply all
Reply to author
Forward
0 new messages