aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pyaggr3g470r/__init__.py14
-rw-r--r--pyaggr3g470r/feedgetter.py2
-rw-r--r--pyaggr3g470r/models.py2
-rw-r--r--pyaggr3g470r/views.py2
4 files changed, 4 insertions, 16 deletions
diff --git a/pyaggr3g470r/__init__.py b/pyaggr3g470r/__init__.py
index d4079300..3d63d9de 100644
--- a/pyaggr3g470r/__init__.py
+++ b/pyaggr3g470r/__init__.py
@@ -41,24 +41,12 @@ class FeedView(ModelView):
column_filters = ['title', 'link']
column_searchable_list = ('title', 'link')
-
- form_ajax_refs = {
- 'tags': {
- 'fields': ('title', 'link')
- }
- }
class ArticleView(ModelView):
column_filters = ['title', 'link']
column_searchable_list = ('title', 'link')
-
- form_ajax_refs = {
- 'tags': {
- 'fields': ('title', 'link')
- }
- }
admin.add_view(FeedView(Feed))
admin.add_view(ArticleView(Article))
-from pyaggr3g470r import views
+from pyaggr3g470r import views \ No newline at end of file
diff --git a/pyaggr3g470r/feedgetter.py b/pyaggr3g470r/feedgetter.py
index 998e768a..16571294 100644
--- a/pyaggr3g470r/feedgetter.py
+++ b/pyaggr3g470r/feedgetter.py
@@ -148,7 +148,7 @@ class FeedGetter(object):
article_title, description)).start()
"""
feed.articles.extend(articles)
- #feed.articles = sorted(feed.articles, key=lambda t: t.date, reverse=True)
+ feed.articles = sorted(feed.articles, key=lambda t: t.date, reverse=True)
feed.save()
diff --git a/pyaggr3g470r/models.py b/pyaggr3g470r/models.py
index 58b350ea..dfc40b28 100644
--- a/pyaggr3g470r/models.py
+++ b/pyaggr3g470r/models.py
@@ -29,7 +29,7 @@ class Feed(Document):
link = StringField(required=True)
site_link = StringField(required=True)
mail = BooleanField()
- articles = SortedListField(ReferenceField('Article', dbref = False))
+ articles = ListField(ReferenceField('Article', dbref = False))
created_date = DateTimeField(required=True, default=datetime.now)
meta = {
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index f2cfc095..81c60e73 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -59,7 +59,7 @@ def delete(article_id=None):
@app.route('/articles/<feed_id>', methods=['GET'])
def articles(feed_id=None):
feed = models.Feed.objects(id=feed_id).first()
- feed.articles = sorted(feed.articles, key=lambda t: t.date, reverse=True)
+ #feed.articles = sorted(feed.articles, key=lambda t: t.date, reverse=True)
return render_template('articles.html', feed=feed)
@app.route('/favorites/', methods=['GET'])
bgstack15