diff --git a/photologue/models.py b/photologue/models.py index a92077f..94b8a2e 100644 --- a/photologue/models.py +++ b/photologue/models.py @@ -190,7 +190,7 @@ class Gallery(models.Model): photo_set = self.photos.filter(is_public=True) else: photo_set = self.photos - return random.sample(set(photo_set), count) + return random.sample(sorted(set(photo_set)), count) def photo_count(self, public=True): """Return a count of all the photos in this gallery."""