This commit is contained in:
Виктор Гладких 2019-11-21 14:33:27 +03:00
parent 938b9436eb
commit 9a2f7fec39

View File

@ -101,14 +101,12 @@ class Command(BaseCommand):
p.tags.clear()
print('End clear tags product')
def remove_tags(self):
print('Begin delete many tags')
Tag.objects.\
filter(news__isnull=True, establishments__isnull=True).delete()
print('End delete many tags')
def product_sql(self):
with connections['legacy'].cursor() as cursor:
cursor.execute('''