1๐
โ
As I can see there are 2 errors:
-
There is extra
ticket_city_scraper
in your path.Should be:
from trydjango18.ticket_city_scraper.ticket_city_scraper.spiders.tc_spiders import spiderCrawl
-
There is no
tc_spiders.py
.Either add
tc_spiders.py
or import fromtc_spider.py
.
Considering that you asked about
the spider.py file
I assume that you meant tc_spider.py
, thus a complete solution is:
from trydjango18.ticket_city_scraper.ticket_city_scraper.spiders.tc_spider import spiderCrawl
Also make sure that:
- Each package contains
__init__.py
. tc_spiders.py
/tc_spider.py
contains module-level functionspiderCrawl
.
๐คErnest
- How do I set the template_name using generic.TemplateView based on is_authenticated vs is_superuser?
Source:stackexchange.com