Run the grocery store example

160 views
Skip to first unread message

Ken

unread,
Jan 22, 2014, 11:03:49 AM1/22/14
to eav-d...@googlegroups.com
 I am running OSX Lion 10.8.
I can manage to install the eav package and even import it from the shell. However I can not import the classes (BaseEntity, BaseAttribute, BaseSchema)

I downloaded the package from here https://bitbucket.org/neithere/eav-django/ and ran python setup.py install from within my virtual environment.

>>> import eav 
>>> from eav.models import BaseEntity, BaseSchema, BaseAttribute
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/Users/myusername/Desktop/VIRTUALENVS/eav-envs/EAV/lib/python2.7/site-packages/eav_django-1.4.4-py2.7.egg/eav/models.py", line 34, in <module>
    from autoslug.fields import AutoSlugField
ImportError: No module named autoslug.fields
>>>

I don't understand why it breaks. Please help

zzart

unread,
Jan 22, 2014, 12:22:38 PM1/22/14
to eav-d...@googlegroups.com
Hi Ken , perhaps you need to install autoslug. 
pip install autoslug 
also view_shortcuts is another dependency.. 

Ken

unread,
Jan 23, 2014, 5:48:58 AM1/23/14
to eav-d...@googlegroups.com
Thanks zzart. I installed the two packages and I can now import the classes.

zzart

unread,
Jan 23, 2014, 6:01:11 AM1/23/14
to eav-d...@googlegroups.com
Ken if you want documentation you may want to look into http://mvpdev.github.io/django-eav/ package instead. 
Otherwise you have only the tests.py file to follow and the source. 
eav-django has been working really well for my project but if you will be doing lots of filtering eav fields then django-eav might be better. I haven't used though. 
good luck

Ken

unread,
Jan 23, 2014, 8:56:15 AM1/23/14
to eav-d...@googlegroups.com
Thanks alot I ran into that documentation in my internet searches. I am going through it at the moment. What development environment are you using? I can import eav
but not eav.models

zzart

unread,
Jan 23, 2014, 9:43:36 AM1/23/14
to eav-d...@googlegroups.com
I can import this fine :
from eav.models import BaseEntity, BaseSchema, BaseAttribute

what output are you getting ? 

this clearly suggests no autoslug

>>> from eav.models import BaseEntity, BaseSchema, BaseAttribute
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/Users/myusername/Desktop/VIRTUALENVS/eav-envs/EAV/lib/python2.7/site-packages/eav_django-1.4.4-py2.7.egg/eav/models.py", line 34, in <module>
    from autoslug.fields import AutoSlugField
ImportError: No module named autoslug.fields
>>> 


also this line 
eav_django-1.4.4-py2.7.egg/eav/models.py

is a bit odd ... 
So far I've not come accross any installer which would install main lib into egg folder. it is usualy something like 

lib/python3.3/site-packages/eav  <- main lib files
lib/python3.3/site-packages/eav_django-1.4.4-py2.7.egg/   <- redme and other stuff

but i might be wrong since im always using PIP to install libs into virtual env.
Try move eav folder into main site-packages and do the same with autoslug, view_shortcuts

Im curious to see the docs,  if you ve found them share ;)
Reply all
Reply to author
Forward
0 new messages