Back to questions

Junior Gantin on October 21 - 06:33:23
Unable to import models into seeder files

I currently have defined my models in a separate app/models directory, but the following syntax to import the model class into the seeder fails:

from app.models.Category import Category

For now I've been advised to worr around as follows, but it'd be nice to see this closed soon: ``` import os import sys sys.path.append(os.getcwd())

from app.models.Category import Category ```

No answers yet.