From 19f9d92923ea67cf56c202f1d5c0e12ad939d241 Mon Sep 17 00:00:00 2001 From: adityadharne Date: Mon, 13 Mar 2017 14:05:07 -0400 Subject: [PATCH] Fixes #746 - Order of collections --- sfm/ui/models.py | 6 +++--- sfm/ui/views.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sfm/ui/models.py b/sfm/ui/models.py index 3a5a45ea..3a22cb49 100644 --- a/sfm/ui/models.py +++ b/sfm/ui/models.py @@ -303,13 +303,13 @@ class Collection(models.Model): (60 * 24 * 7 * 4, 'Every 4 weeks') ] HARVEST_CHOICES = [ + (TWITTER_USER_TIMELINE, 'Twitter user timeline'), (TWITTER_SEARCH, 'Twitter search'), (TWITTER_FILTER, 'Twitter filter'), - (TWITTER_USER_TIMELINE, 'Twitter user timeline'), (TWITTER_SAMPLE, 'Twitter sample'), + (TUMBLR_BLOG_POSTS, 'Tumblr blog posts'), (FLICKR_USER, 'Flickr user'), - (WEIBO_TIMELINE, 'Weibo timeline'), - (TUMBLR_BLOG_POSTS, 'Tumblr blog posts') + (WEIBO_TIMELINE, 'Weibo timeline') ] HARVEST_DESCRIPTION = { TWITTER_SEARCH: 'Recent tweets matching a query', diff --git a/sfm/ui/views.py b/sfm/ui/views.py index eaad399f..1480446b 100644 --- a/sfm/ui/views.py +++ b/sfm/ui/views.py @@ -62,7 +62,7 @@ def get_context_data(self, **kwargs): context['collection_list'] = Collection.objects.filter( collection_set=self.object.pk).annotate(num_seeds=Count('seeds')).order_by('name') context["diffs"] = diff_object_history(self.object) - context["harvest_types"] = sorted(Collection.HARVEST_CHOICES) + context["harvest_types"] = Collection.HARVEST_CHOICES context["harvest_description"] = Collection.HARVEST_DESCRIPTION context["item_id"] = self.object.id context["model_name"] = "collection_set"