1👍
✅
Databases seldom auto-populate themselves out of thin air and fresh water, so you very probably have some code somewhere that creates Feed instances (signal, cron job, whatever, doesn’t even have to be python code).
0👍
try:
feeds = Feed.objects.annotate(num_subs=Count('subscriptions')).filter(num_subs=0).all().delete()
👤levi
- [Answer]-Pass Data From Python To Html <p> Tag
- [Answer]-Django making recursive calls on relationship
Source:stackexchange.com