리스트 컴프레이션

박재용·2020년 11월 10일
0
            #     UserTagFilter.objects.create(user_id = get_user_id , tag_id=Tag.objects.get(id=5).id)
                # print("dd")
                # User.objects.get(id=6).tag_filters.select_related().delete()
                # UserTagFilter.objects.create(user_id = get_user_id , tag_id=5)

        # [ x.delete() for x in [filter_delete.usertagfilter_set.all(),filter_delete.userdistrictfilter_set.all(),filter_delete.usercareerfilter_set.all()]]
        
        # [ UserTagFilter.objects.create(user_id = get_user_id , tag_id=Tag.objects.get(id=x).id) for x in tag_list[0] if x!=0]

        # [ UserDistrictFilter.objects.create(user_id = get_user_id , district_id=x) for x in tag_list[1] if x!=0]

        # [ UserCareerFilter.objects.create(user_id=get_user_id , career_id=x) for x in tag_list[2] if x!=0]
profile
박재용이란 사람이 복습을 하기위해 만든 벨로그 입니다 . 잘부탁드려요

0개의 댓글