def blacklist_user_agents(self, request, queryset):
        for obj in queryset:
            ua, created = BlacklistUserAgent.objects.get_or_create(
                user_agent=obj.user_agent)
            if created:
                ua.save()
        msg = _("Successfully blacklisted %d User Agents") % queryset.count()
        self.message_user(request, msg)
dataset/ETHPy150Open thornomad/django-hitcount/hitcount/admin.py/HitAdmin.blacklist_user_agents/original