re: Django Same data objects get created every time! VIEW POST


Each time the code is loaded, the create function is called but there is nothing to prevent duplicates. For a web scraper, it's a good idea to create a cool down feature with an off-switch for debugging.

 for i in range(len(iitg_title)):
        News.objects.create(title = iitg_title[i], datess = iitg_date[i], linkss = iitg_link[i])
Code of Conduct Report abuse