metashare/META-SHARE — pull request #244 by zeehio (2012-05-20 22:22:27+00:00)
Title: Small issue with python path

Problem
=====
If python, django, etc are installed using `install-dependencies.sh`, the "lib/python2.7/site-packages" directory must be in the python path if we want python to find django and the rest of installed modules.

Currently, manage.py adds the directory to the path.
storage_admin.py does not add the directory "lib/python2.7/site-packages" giving an error when importing django.

Reproduce the error:
========
Use install-dependencies, setup metashare, add a resource and try adding a storageobject using storage_admin.py
> python storage_admin.py checksum b189e4a6a2c211e19ae9000e0c4ad2262bb2a705e742487295c2c0965a0b77f8
>Traceback (most recent call last):
> File "storage_admin.py", line 228, in
> from metashare.storage.models import StorageObject
> File "/home/meta1/MetaNode/META-SHARE-v2.1/metashare/storage/models.py", line 8, in
> from django.core.exceptions import ValidationError
> ImportError: No module named django.core.exceptions

Solution
======
With this commit, storage_admin.py adds to the path the required directory.

Proof that the module is found:
=======
> python storage_admin.py checksum b189e4a6a2c211e19ae9000e0c4ad2262bb2a705e742487295c2c0965a0b77f8
> Checksum: 08b13ea3b9f9df673fb14080b78107b8