Reputation: 43
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
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