Commit 2e69933197fb2066cab9cfa318a029e4746288f9

Authored by Sergio Oliveira
1 parent 03734538

Adding feedzilla as blog aggregator

requirements.txt
... ... @@ -5,3 +5,9 @@ pytz==2011n
5 5 chardet==1.0.1
6 6 python-dateutil==1.5
7 7 django-cliauth==0.9
  8 +feedzilla
  9 +django-common
  10 +django-tagging
  11 +feedparser
  12 +lxml
  13 +grab
... ...
src/colab/custom_settings.py
... ... @@ -16,6 +16,7 @@ LANGUAGES = (
16 16 LANGUAGE_CODE = 'pt-br'
17 17  
18 18 INSTALLED_APPS = INSTALLED_APPS + (
  19 +
19 20 # Not standard apps
20 21 'south',
21 22 'cliauth',
... ... @@ -25,6 +26,12 @@ INSTALLED_APPS = INSTALLED_APPS + (
25 26 'api',
26 27 'rss',
27 28 'colab.deprecated',
  29 + 'planet',
  30 +
  31 + # Feedzilla and deps
  32 + 'feedzilla',
  33 + 'tagging',
  34 + 'common',
28 35 )
29 36  
30 37 LOGGING = {
... ... @@ -87,6 +94,11 @@ STATICFILES_DIRS = (
87 94 os.path.join(BASE_DIR, 'colab', 'static'),
88 95 )
89 96  
  97 +from feedzilla.settings import *
  98 +FEEDZILLA_PAGE_SIZE = 5
  99 +FEEDZILLA_SITE_TITLE = gettext(u'Planet Colab')
  100 +FEEDZILLA_SITE_DESCRIPTION = gettext(u'Colab blog aggregator')
  101 +
90 102 try:
91 103 from local_settings import *
92 104 except ImportError:
... ...
src/colab/urls.py
... ... @@ -51,6 +51,8 @@ urlpatterns = patterns('',
51 51  
52 52 url(r'^account/logout/$', 'django.contrib.auth.views.logout',
53 53 {'next_page': '/'}, name='logout'),
  54 +
  55 + url(r'^planet/', include('feedzilla.urls')),
54 56  
55 57 # Uncomment the next line to enable the admin:
56 58 url(r'^colab/admin/', include(admin.site.urls)),
... ...
src/planet/__init__.py 0 → 100644
src/planet/admin.py 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +from django.contrib import admin
  2 +
  3 +# Register your models here.
... ...
src/planet/locale/pt_BR/LC_MESSAGES/django.mo 0 → 100644
No preview for this file type
src/planet/locale/pt_BR/LC_MESSAGES/django.po 0 → 100644
... ... @@ -0,0 +1,42 @@
  1 +# SOME DESCRIPTIVE TITLE.
  2 +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
  3 +# This file is distributed under the same license as the PACKAGE package.
  4 +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
  5 +#
  6 +msgid ""
  7 +msgstr ""
  8 +"Project-Id-Version: PACKAGE VERSION\n"
  9 +"Report-Msgid-Bugs-To: \n"
  10 +"POT-Creation-Date: 2013-07-24 15:40-0300\n"
  11 +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  12 +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  13 +"Language-Team: LANGUAGE <LL@li.org>\n"
  14 +"Language: \n"
  15 +"MIME-Version: 1.0\n"
  16 +"Content-Type: text/plain; charset=UTF-8\n"
  17 +"Content-Transfer-Encoding: 8bit\n"
  18 +"Plural-Forms: nplurals=2; plural=(n > 1);\n"
  19 +
  20 +#: templates/common/pagination.html:5 templates/common/pagination.html.py:7
  21 +msgid "previous"
  22 +msgstr "anterior"
  23 +
  24 +#: templates/common/pagination.html:31 templates/common/pagination.html:33
  25 +msgid "next"
  26 +msgstr "próxima"
  27 +
  28 +#: templates/feedzilla/base.html:6
  29 +msgid "Planet"
  30 +msgstr "Planet"
  31 +
  32 +#: templates/feedzilla/base.html:15
  33 +msgid "Submit a blog"
  34 +msgstr "Solicite a inclusão de um blog"
  35 +
  36 +#: templates/feedzilla/base.html:18
  37 +msgid "Tags"
  38 +msgstr "Tags"
  39 +
  40 +#: templates/feedzilla/base.html:22
  41 +msgid "Blogs"
  42 +msgstr "Blogs"
... ...
src/planet/models.py 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +from django.db import models
  2 +
  3 +# Create your models here.
... ...
src/planet/templates/common/pagination.html 0 → 100644
... ... @@ -0,0 +1,38 @@
  1 +{% load i18n %}
  2 +{% if page.paginator.num_pages > 1 %}
  3 +<div class="pagination">
  4 + {% if page.has_previous %}
  5 + <a href="{{ alterpath }}{{ page.previous_page_url }}">&laquo; {% trans "previous" %}</a>
  6 + {% else %}
  7 + <span class="control">&laquo; {% trans "previous" %}</span>
  8 + {% endif %}
  9 +
  10 + {% if page.paginator.frame_start_page > 1 %}
  11 + <a href="{{ alterpath }}{{ page.first_page_url }}">1</a>
  12 + {% if page.paginator.frame_start_page > 2 %}
  13 + <span class="control">...</span>
  14 + {% endif %}
  15 + {% endif %}
  16 +
  17 + {% for number, url in page.paginator.frame %}
  18 + {% if not url %}..{% else %}
  19 + <a {% ifequal page.number number%}class="active"{% endifequal %} href="{{ alterpath }}{{ url }}">{{ number }}</a>
  20 + {% endif %}
  21 + {% endfor %}
  22 +
  23 + {% if page.paginator.frame_end_page != page.paginator.num_pages %}
  24 + {% if page.paginator.frame_end_page != page.paginator.num_pages|add:"-1" %}
  25 + <span class="control">...</span>
  26 + {% endif %}
  27 + <a href="{{ alterpath }}{{ page.last_page_url }}">{{ page.paginator.num_pages }}</a>
  28 + {% endif %}
  29 +
  30 + {% if page.has_next %}
  31 + <a href="{{ alterpath }}{{ page.next_page_url }}">{% trans "next" %} &raquo;</a>
  32 + {% else %}
  33 + <span class="control">{% trans "next" %} &raquo;</span>
  34 + {% endif %}
  35 +
  36 + <div class="clear"></div>
  37 +</div>
  38 +{% endif %}
... ...
src/planet/templates/feedzilla/base.html 0 → 100644
... ... @@ -0,0 +1,26 @@
  1 +{% extends 'base.html' %}
  2 +{% load i18n %}
  3 +{% load feedzilla_tags %}
  4 +
  5 +{% block main-content %}
  6 + <h2>{% trans 'Planet' %}</h2>
  7 + <hr/>
  8 +
  9 + <div class="span-18">
  10 + {% block feedzilla_content %}{% endblock %}
  11 + </div>
  12 +
  13 + <div class="span-6 last">
  14 + <div class="box">
  15 + <a href="{% url "feedzilla_submit_blog" %}">{% trans "Submit a blog" %}</a>
  16 + </div>
  17 + <div class="box">
  18 + <h3>{% trans 'Tags' %}</h3>
  19 + {% feedzilla_tag_cloud %}
  20 + </div>
  21 + <div class="box">
  22 + <h3>{% trans 'Blogs' %}</h3>
  23 + {% feedzilla_donor_list %}
  24 + </div>
  25 + </div>
  26 +{% endblock %}
... ...
src/planet/tests.py 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +from django.test import TestCase
  2 +
  3 +# Create your tests here.
... ...
src/planet/views.py 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +from django.shortcuts import render
  2 +
  3 +# Create your views here.
... ...