Newbie in Pyramid framework. I'm trying to include scrapers.py
file in my views.py
file.
Here's my dir
root
-static/
-templates/
__init__.py
views.py
scrapers.py
scrapers.py
def hello():
h=[1,2,3,4]
return h
views.py
from pyramid.view import view_config
from scrapers import *
@view_config(route_name='home', renderer='templates/mytemplate.jinja2')
def my_view(request):
h=hello()
return {'project': 'news-aggregator','h':h}
However, I'm getting the following error.
from scrapers import *
ModuleNotFoundError: No module named 'scrapers'
I have no idea why is it showing this error. My IDE seems to be detecting the file, but for some reason pyramid seems to be not. Do I have to include something else?