'Remove all files uploaded as badges.'

def cleanup_uploads(self):

    upload_to = BadgeClass._meta.get_field('image').upload_to
    if default_storage.exists(upload_to):
        (_, files) = default_storage.listdir(upload_to)
        for uploaded_file in files:
            default_storage.delete(((upload_to + '/') + uploaded_file))
