From 2e69933197fb2066cab9cfa318a029e4746288f9 Mon Sep 17 00:00:00 2001 From: Sergio Oliveira Date: Wed, 24 Jul 2013 15:51:45 -0300 Subject: [PATCH] Adding feedzilla as blog aggregator --- requirements.txt | 6 ++++++ src/colab/custom_settings.py | 12 ++++++++++++ src/colab/urls.py | 2 ++ src/planet/__init__.py | 0 src/planet/admin.py | 3 +++ src/planet/locale/pt_BR/LC_MESSAGES/django.mo | Bin 0 -> 662 bytes src/planet/locale/pt_BR/LC_MESSAGES/django.po | 42 ++++++++++++++++++++++++++++++++++++++++++ src/planet/models.py | 3 +++ src/planet/templates/common/pagination.html | 38 ++++++++++++++++++++++++++++++++++++++ src/planet/templates/feedzilla/base.html | 26 ++++++++++++++++++++++++++ src/planet/tests.py | 3 +++ src/planet/views.py | 3 +++ 12 files changed, 138 insertions(+), 0 deletions(-) create mode 100644 src/planet/__init__.py create mode 100644 src/planet/admin.py create mode 100644 src/planet/locale/pt_BR/LC_MESSAGES/django.mo create mode 100644 src/planet/locale/pt_BR/LC_MESSAGES/django.po create mode 100644 src/planet/models.py create mode 100644 src/planet/templates/common/pagination.html create mode 100644 src/planet/templates/feedzilla/base.html create mode 100644 src/planet/tests.py create mode 100644 src/planet/views.py diff --git a/requirements.txt b/requirements.txt index 8c9ccd7..ab2d6cb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,3 +5,9 @@ pytz==2011n chardet==1.0.1 python-dateutil==1.5 django-cliauth==0.9 +feedzilla +django-common +django-tagging +feedparser +lxml +grab diff --git a/src/colab/custom_settings.py b/src/colab/custom_settings.py index 8b90023..ebf7faa 100644 --- a/src/colab/custom_settings.py +++ b/src/colab/custom_settings.py @@ -16,6 +16,7 @@ LANGUAGES = ( LANGUAGE_CODE = 'pt-br' INSTALLED_APPS = INSTALLED_APPS + ( + # Not standard apps 'south', 'cliauth', @@ -25,6 +26,12 @@ INSTALLED_APPS = INSTALLED_APPS + ( 'api', 'rss', 'colab.deprecated', + 'planet', + + # Feedzilla and deps + 'feedzilla', + 'tagging', + 'common', ) LOGGING = { @@ -87,6 +94,11 @@ STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'colab', 'static'), ) +from feedzilla.settings import * +FEEDZILLA_PAGE_SIZE = 5 +FEEDZILLA_SITE_TITLE = gettext(u'Planet Colab') +FEEDZILLA_SITE_DESCRIPTION = gettext(u'Colab blog aggregator') + try: from local_settings import * except ImportError: diff --git a/src/colab/urls.py b/src/colab/urls.py index d2ce0d4..5b4d200 100644 --- a/src/colab/urls.py +++ b/src/colab/urls.py @@ -51,6 +51,8 @@ urlpatterns = patterns('', url(r'^account/logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='logout'), + + url(r'^planet/', include('feedzilla.urls')), # Uncomment the next line to enable the admin: url(r'^colab/admin/', include(admin.site.urls)), diff --git a/src/planet/__init__.py b/src/planet/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/planet/__init__.py diff --git a/src/planet/admin.py b/src/planet/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/src/planet/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/src/planet/locale/pt_BR/LC_MESSAGES/django.mo b/src/planet/locale/pt_BR/LC_MESSAGES/django.mo new file mode 100644 index 0000000..06759e3 Binary files /dev/null and b/src/planet/locale/pt_BR/LC_MESSAGES/django.mo differ diff --git a/src/planet/locale/pt_BR/LC_MESSAGES/django.po b/src/planet/locale/pt_BR/LC_MESSAGES/django.po new file mode 100644 index 0000000..42258b4 --- /dev/null +++ b/src/planet/locale/pt_BR/LC_MESSAGES/django.po @@ -0,0 +1,42 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-07-24 15:40-0300\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: templates/common/pagination.html:5 templates/common/pagination.html.py:7 +msgid "previous" +msgstr "anterior" + +#: templates/common/pagination.html:31 templates/common/pagination.html:33 +msgid "next" +msgstr "próxima" + +#: templates/feedzilla/base.html:6 +msgid "Planet" +msgstr "Planet" + +#: templates/feedzilla/base.html:15 +msgid "Submit a blog" +msgstr "Solicite a inclusão de um blog" + +#: templates/feedzilla/base.html:18 +msgid "Tags" +msgstr "Tags" + +#: templates/feedzilla/base.html:22 +msgid "Blogs" +msgstr "Blogs" diff --git a/src/planet/models.py b/src/planet/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/src/planet/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/src/planet/templates/common/pagination.html b/src/planet/templates/common/pagination.html new file mode 100644 index 0000000..4cb83d3 --- /dev/null +++ b/src/planet/templates/common/pagination.html @@ -0,0 +1,38 @@ +{% load i18n %} +{% if page.paginator.num_pages > 1 %} + +{% endif %} diff --git a/src/planet/templates/feedzilla/base.html b/src/planet/templates/feedzilla/base.html new file mode 100644 index 0000000..72e62bb --- /dev/null +++ b/src/planet/templates/feedzilla/base.html @@ -0,0 +1,26 @@ +{% extends 'base.html' %} +{% load i18n %} +{% load feedzilla_tags %} + +{% block main-content %} +

{% trans 'Planet' %}

+
+ +
+ {% block feedzilla_content %}{% endblock %} +
+ +
+ +
+

{% trans 'Tags' %}

+ {% feedzilla_tag_cloud %} +
+
+

{% trans 'Blogs' %}

+ {% feedzilla_donor_list %} +
+
+{% endblock %} diff --git a/src/planet/tests.py b/src/planet/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/src/planet/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/src/planet/views.py b/src/planet/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/src/planet/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. -- libgit2 0.21.2