Saving Django model from Scrapy project

后端 未结 2 938
情歌与酒
情歌与酒 2020-12-06 02:43

I have a Scrapy project and I am trying to save the output items as an object from a Django model definition (I am not using DjangoItem).

I am importing Django setti

相关标签:
2条回答
  • 2020-12-06 03:05

    I remember missing of __init__.py file can cause some weird problems. Do you have it on all your modules?

    0 讨论(0)
  • 2020-12-06 03:12

    I had the same problem and I found a solution. At least, it worked for me.

    In my case the problem was in Django project's setting.py file - I added not the FQN (fully qualified name) of the my app to the INSTALLED_APPS tuple, but it's short name.

    Talking about your example, it may be that you added to the INSTALLED_APPS the my_books element, but not the my_django_project.apps.my_books.

    0 讨论(0)
提交回复
热议问题