Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 1. Artwork Gallery
- def show_highest_rated_art():
- best_art = ArtworkGallery.objects.order_by("-rating", "id").first()
- retrun f"{best_art.art_name} is the highest-rated art with {best_art.rating} rating!"
- def bulk_create_arts(first_art, second_art):
- ArtworkGallery.objects.bulk_create([first_art, second_art])
- def delete_negative_rated_arts():
- ArtworkGallery.objects.filter(rating__lt=0).delete()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement