user3786468
user3786468

Reputation: 43

Working on AppScale's Datastore using terminal

Following this step I managed to connect to AppScale's Datastore with remote_api. But can't have access to my models. I have a file named "models.py" in my app, i wanna import it to uses my db classes.

myapp> import models
Traceback (most recent call last):
  File "<console>", line 1, in <module>
ImportError: No module named models
myapp > from models import MyClass
Traceback (most recent call last):
  File "<console>", line 1, in <module>
ImportError: No module named models

Upvotes: 1

Views: 70

Answers (1)

Navraj Chohan
Navraj Chohan

Reputation: 627

You want to make sure you set your path so that it can find the model.py file. Append to the path: sys.path.append(os.path.join("/PATH/TO/FILE"))

Upvotes: 2

Related Questions