@property
    def owner_search_fields(self):
        try:
            from django.contrib.auth import get_user_model
        except ImportError:  # Django < 1.5
            from django.contrib.auth.models import User
        else:
            User = get_user_model()
        return [
            field.name for field in User._meta.fields
            if isinstance(field, models.CharField) and field.name != 'password'
        ]
Get the start and end formatted for query
dataset/ETHPy150Open django-leonardo/django-leonardo/leonardo/module/media/admin/folder/admin.py/FolderAdmin.owner_search_fields--crossover with--dataset/ETHPy150Open alphagov/performanceplatform-collector/performanceplatform/collector/webtrends/keymetrics.py/Collector.date_range_for_webtrends