Show More
@@ -25,9 +25,9 b' class AttachmentManager(models.Manager):' | |||||
25 |
|
25 | |||
26 | def get_random_images(self, count, tags=None): |
|
26 | def get_random_images(self, count, tags=None): | |
27 | images = self.filter(mimetype__in=FILE_TYPES_IMAGE).exclude( |
|
27 | images = self.filter(mimetype__in=FILE_TYPES_IMAGE).exclude( | |
28 |
|
|
28 | attachment_posts__thread__status=STATUS_ARCHIVE) | |
29 | if tags is not None: |
|
29 | if tags is not None: | |
30 |
images = images.filter( |
|
30 | images = images.filter(attachment_posts__threads__tags__in=tags) | |
31 | return images.order_by('?')[:count] |
|
31 | return images.order_by('?')[:count] | |
32 |
|
32 | |||
33 |
|
33 |
General Comments 0
You need to be logged in to leave comments.
Login now