18 lines
613 B
Python
18 lines
613 B
Python
|
|
import os
|
|
import django
|
|
|
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
|
|
django.setup()
|
|
|
|
from core.models import Voter, Tenant
|
|
|
|
def check_none():
|
|
print(f"Voters with NULL address_street: {Voter.objects.filter(address_street__isnull=True).count()}")
|
|
print(f"Voters with empty address_street: {Voter.objects.filter(address_street='').count()}")
|
|
print(f"Voters with NULL neighborhood: {Voter.objects.filter(neighborhood__isnull=True).count()}")
|
|
print(f"Voters with empty neighborhood: {Voter.objects.filter(neighborhood='').count()}")
|
|
|
|
if __name__ == "__main__":
|
|
check_none()
|