What's the better way to organize Django + Scrapy? My goal is to use Django to create scrapy tasks and have scrapy populate Django database.
I've previously have created a scrapy and django project that both sat in the root directory, but I had a lot of PATH and os.environ problems where I had scripts to set my PATH to get things to run. I want to avoid that.
I've seen two solutions:
- Start a Django project, and create a scrapy sub-project using SCRAPY_SETTINGS_MODULE environ (See Mikhail's answer here Access django models inside of Scrapy)
- Start a Scrapy project, use DjangoItem, and use DJANGO_SETTINGS_MODULE environ
What are the pros and cons of each solution?