Last active
January 4, 2016 20:49
-
-
Save gpennington/8676650 to your computer and use it in GitHub Desktop.
Pulse Area/Users
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#webserver | |
(activate virtualenv first) | |
python manage.py shell --settings=settings.production | |
#python console | |
>>> from django.contrib.auth.models import User | |
>>> from meta.models import Area | |
>>> janelle = User.objects.get(pk=2) | |
>>> hodgins2 = User.objects.get(pk=54) | |
>>> Area.objects.exclude(owners=None).count() | |
566 | |
>>> Area.objects.exclude(owners__in=[janelle, hodgins2]).count() | |
310 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment