Skip to content

Commit

Permalink
Some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
andrelramos committed Aug 27, 2016
1 parent 522c59b commit 990c795
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ class ExternalBlogsAdmin(ModelAdmin):


class AggregatedTopicAdmin(ModelAdmin):

roles_accepted = ('admin', 'editor')
column_filters = ('title', 'date', 'blog')
column_searchable_list = ('title', 'topic_url')
column_list = ('title', 'date', 'blog', 'topic_url', 'description')
form_columns = ('title', 'date', 'blog', 'topic_url', 'description')

# Register RSSaggregator models to quokka admin page
admin.register(ExternalBlogs, ExternalBlogsAdmin, category=_("RSSaggregator"), name=_l("External Blogs"))
admin.register(AggregatedTopic, AggregatedTopicAdmin, category=_("RSSaggregator"), name=_l("Aggregated Topics"))
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
from quokka.core.app import QuokkaModule
from .views import AggregatedTopicsListView


# Blueprint endpoints
module = QuokkaModule("rssaggregator", __name__, template_folder="templates")
module.add_url_rule('/aggregated-topics/', view_func=AggregatedTopicsListView.as_view('aggregated topic'))
4 changes: 4 additions & 0 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@


def get_external_topic(**kwargs):
'''
:param kwargs: This function allows kwargs to give filter power for user
:return: AggregatedTopic List
'''
topics = AggregatedTopic.objects(**kwargs)

return topics.order_by('date')
Expand Down

0 comments on commit 990c795

Please sign in to comment.