Commit b3f265604f2115ee0d13ff514b19bc88cc342045

Authored by Gust
1 parent 60d9b7a3

Remove Feedzilla dependencies

Signed-off-by: Gustavo Jaruga <darksshades@gmail.com>
Signed-off-by: Alexandre Barbosa <alexandreab@live.com>
Signed-off-by: Carolina Ramalho <carol15022@hotmail.com
colab/planet/__init__.py
colab/planet/admin.py
... ... @@ -1,4 +0,0 @@
1   -# uncomment the import if you really use.
2   -# from django.contrib import admin
3   -
4   -# Register your models here.
colab/planet/context_processors.py
... ... @@ -1,6 +0,0 @@
1   -
2   -from django.conf import settings
3   -
4   -
5   -def feedzilla(request):
6   - return {'feedzilla': getattr(settings, 'FEEDZILLA_ENABLED', False)}
colab/planet/locale/es/LC_MESSAGES/django.po
... ... @@ -1,103 +0,0 @@
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   -# Leonardo J. Caballero G. <leonardocaballero@gmail.com>, 2013.
5   -msgid ""
6   -msgstr ""
7   -"Project-Id-Version: PACKAGE VERSION\n"
8   -"Report-Msgid-Bugs-To: \n"
9   -"POT-Creation-Date: 2013-07-26 11:28-0300\n"
10   -"PO-Revision-Date: 2013-10-15 23:46-0430\n"
11   -"Last-Translator: Leonardo J. Caballero G. <leonardocaballero@gmail.com>\n"
12   -"Language-Team: ES <LL@li.org>\n"
13   -"Language: es\n"
14   -"MIME-Version: 1.0\n"
15   -"Content-Type: text/plain; charset=UTF-8\n"
16   -"Content-Transfer-Encoding: 8bit\n"
17   -"Plural-Forms: nplurals=2; plural=(n != 1);\n"
18   -"X-Generator: Virtaal 0.7.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óximo"
27   -
28   -#: templates/feedzilla/_post_template.html:9
29   -msgid "From"
30   -msgstr "De"
31   -
32   -#: templates/feedzilla/_post_template.html:9
33   -msgid "on"
34   -msgstr "en"
35   -
36   -#: templates/feedzilla/_post_template.html:17
37   -msgid "Read original"
38   -msgstr "Leer original"
39   -
40   -#: templates/feedzilla/base.html:6
41   -msgid "Planet"
42   -msgstr "Planeta"
43   -
44   -#: templates/feedzilla/base.html:15 templates/feedzilla/submit_blog.html:5
45   -msgid "Submit a blog"
46   -msgstr "Solicite la inclusión de un blog"
47   -
48   -#: templates/feedzilla/base.html:18
49   -msgid "Tags"
50   -msgstr "Etiquetas"
51   -
52   -#: templates/feedzilla/base.html:22
53   -msgid "Source Blogs"
54   -msgstr "Fuente de Blogs"
55   -
56   -#: templates/feedzilla/submit_blog.html:8
57   -msgid ""
58   -"Thank you. Your application has been accepted and will be reviewed by admin "
59   -"in the near time."
60   -msgstr "Gracias. Su solicitud ha sido aceptado y sera revisado por el administrador, lo mas pronto posible."
61   -
62   -#: templates/feedzilla/submit_blog.html:10
63   -msgid "Required fields"
64   -msgstr "Campos requeridos"
65   -
66   -#: templates/feedzilla/submit_blog.html:14
67   -msgid "Blog Information"
68   -msgstr "Información del blog"
69   -
70   -#: templates/feedzilla/submit_blog.html:15
71   -msgid "Blog URL"
72   -msgstr "Dirección URL de Blog"
73   -
74   -#: templates/feedzilla/submit_blog.html:16
75   -msgid "Blog name"
76   -msgstr "Nombre de blog"
77   -
78   -#: templates/feedzilla/submit_blog.html:17
79   -msgid "Name of author of the blog"
80   -msgstr "Nombre del autor del blog"
81   -
82   -#: templates/feedzilla/submit_blog.html:18
83   -msgid "Feed URL"
84   -msgstr "Dirección URL de Feed"
85   -
86   -#: templates/feedzilla/submit_blog.html:18
87   -msgid "You can specify what exactly feed you want submit"
88   -msgstr ""
89   -"Usted puede especificar cual feed exactamente usted quiere solicitar su "
90   -"inclusión"
91   -
92   -#: templates/feedzilla/submit_blog.html:19
93   -msgid "Submit"
94   -msgstr "Solicite la inclusión de un blog"
95   -
96   -#: templates/feedzilla/tag.html:5
97   -#, python-format
98   -msgid "Posts with &laquo;%(tag)s&raquo; label"
99   -msgstr "Envíos con etiqueta &laquo;%(tag)s&raquo;"
100   -
101   -#: templates/feedzilla/tag.html:14
102   -msgid "No posts with such label"
103   -msgstr "No hay envíos con dicha etiqueta"
colab/planet/locale/pt_BR/LC_MESSAGES/django.mo
No preview for this file type
colab/planet/locale/pt_BR/LC_MESSAGES/django.po
... ... @@ -1,101 +0,0 @@
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: 2015-01-21 13:55+0000\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   -#: colab/planet/templates/feedzilla/_post_template.html:8
21   -msgid "From"
22   -msgstr "De"
23   -
24   -#: colab/planet/templates/feedzilla/_post_template.html:8
25   -msgid "on"
26   -msgstr "em"
27   -
28   -#: colab/planet/templates/feedzilla/_post_template.html:12
29   -msgid "Read original"
30   -msgstr "Ler original"
31   -
32   -#: colab/planet/templates/feedzilla/base.html:7
33   -msgid "Community Blogs"
34   -msgstr ""
35   -
36   -#: colab/planet/templates/feedzilla/base.html:17
37   -msgid "Tags"
38   -msgstr "Tags"
39   -
40   -#: colab/planet/templates/feedzilla/base.html:21
41   -msgid "Source Blogs"
42   -msgstr "Blogs Fonte"
43   -
44   -#: colab/planet/templates/feedzilla/base.html:25
45   -#: colab/planet/templates/feedzilla/submit_blog.html:5
46   -msgid "Submit a blog"
47   -msgstr "Solicite a inclusão de um blog"
48   -
49   -#: colab/planet/templates/feedzilla/index.html:10
50   -#, fuzzy
51   -#| msgid "There&#39;s no RSS registered"
52   -msgid "There is no RSS registered"
53   -msgstr "Não há RSS cadastrado"
54   -
55   -#: colab/planet/templates/feedzilla/index.html:12
56   -msgid "Please"
57   -msgstr "Por favor"
58   -
59   -#: colab/planet/templates/feedzilla/index.html:13
60   -msgid "click here"
61   -msgstr "clique aqui"
62   -
63   -#: colab/planet/templates/feedzilla/index.html:14
64   -msgid "to submit a blog"
65   -msgstr "para a inclusão de um blog"
66   -
67   -#: colab/planet/templates/feedzilla/submit_blog.html:8
68   -msgid ""
69   -"Thank you. Your application has been accepted and will be reviewed by admin "
70   -"in the near time."
71   -msgstr ""
72   -
73   -#: colab/planet/templates/feedzilla/submit_blog.html:29
74   -#, fuzzy
75   -msgid "Submit"
76   -msgstr "Solicite a inclusão de um blog"
77   -
78   -#: colab/planet/templates/feedzilla/tag.html:7
79   -#, python-format
80   -msgid "Posts with &laquo;%(tag)s&raquo; label"
81   -msgstr ""
82   -
83   -#: colab/planet/templates/feedzilla/tag.html:16
84   -msgid "No posts with such label"
85   -msgstr ""
86   -
87   -#~ msgid "previous"
88   -#~ msgstr "anterior"
89   -
90   -#~ msgid "next"
91   -#~ msgstr "próxima"
92   -
93   -#~ msgid "Planet"
94   -#~ msgstr "Planet"
95   -
96   -#~ msgid "Blog Information"
97   -#~ msgstr "Informações do blog"
98   -
99   -#, fuzzy
100   -#~ msgid "Blog name"
101   -#~ msgstr "Blogs"
colab/planet/management/__init__.py
colab/planet/management/commands/__init__.py
colab/planet/management/commands/update_planet.py
... ... @@ -1,10 +0,0 @@
1   -
2   -from django.conf import settings
3   -
4   -from feedzilla.management.commands import feedzilla_update
5   -
6   -
7   -class Command(feedzilla_update.Command):
8   - def handle(self, *args, **kwargs):
9   - if getattr(settings, 'FEEDZILLA_ENABLED', False):
10   - super(Command, self).handle(*args, **kwargs)
colab/planet/models.py
... ... @@ -1,4 +0,0 @@
1   -# uncomment the import if you really use.
2   -# from django.db import models
3   -
4   -# Create your models here.
colab/planet/templates/common/pagination.html
... ... @@ -1,34 +0,0 @@
1   -{% load i18n %}
2   -{% if page.paginator.num_pages > 1 %}
3   -<div class="text-center">
4   - <ul class="pagination">
5   - {% if page.has_previous %}
6   - <li><a href="{{ alterpath }}{{ page.previous_page_url }}">&laquo;</a></li>
7   - {% endif %}
8   -
9   - {% if page.paginator.frame_start_page > 1 %}
10   - <li><a href="{{ alterpath }}{{ page.first_page_url }}">1</a></li>
11   - {% endif %}
12   - {% if page.paginator.frame_start_page > 2 %}
13   - <li class="disabled"><a href="#">...</a></li>
14   - {% endif %}
15   -
16   - {% for number, url in page.paginator.frame %}
17   - {% if not url %}..{% else %}
18   - <li {% ifequal page.number number%}class="active"{% endifequal %}><a href="{{ alterpath }}{{ url }}">{{ number }}</a></li>
19   - {% endif %}
20   - {% endfor %}
21   -
22   - {% if page.paginator.frame_end_page != page.paginator.num_pages %}
23   - {% if page.paginator.frame_end_page != page.paginator.num_pages|add:"-1" %}
24   - <li class="disabled"><a href="#">...</a></li>
25   - {% endif %}
26   - <li><a href="{{ alterpath }}{{ page.last_page_url }}">{{ page.paginator.num_pages }}</a></li>
27   - {% endif %}
28   -
29   - {% if page.has_next %}
30   - <li><a href="{{ alterpath }}{{ page.next_page_url }}">&raquo;</a></li>
31   - {% endif %}
32   - </ul>
33   -</div>
34   -{% endif %}
colab/planet/templates/feedzilla/_post_template.html
... ... @@ -1,23 +0,0 @@
1   -{% load i18n %}
2   -
3   -<div class="blog-post-item">
4   - <a name="post-{{ post.pk }}"></a>
5   -
6   - <h3><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h3>
7   -
8   - <div class="post-meta">{% trans "From" %} <a href="{{ post.feed.site_url }}">{{ post.feed.author_or_title }}</a> {% trans "on" %} {{ post.created }}</div>
9   -
10   - {{ post.summary|safe }}
11   -
12   - <b><a href="{{ post.get_absolute_url }}">{% trans "Read original" %}</a></b>
13   -
14   - {% if post.tags.count %}
15   - <div class="tags">
16   - <span><b>Tags:</b>
17   - {% for tag in post.tags.all %}
18   - <a href="{% url "feedzilla_tag" tag.name %}" class="tag">{{ tag }}</a>
19   - {% endfor %}
20   - </span>
21   - </div>
22   - {% endif %}
23   -</div>
colab/planet/templates/feedzilla/base.html
... ... @@ -1,32 +0,0 @@
1   -{% extends 'base.html' %}
2   -{% load i18n feedzilla_tags %}
3   -
4   -{% block title %}Blogs{% endblock %}
5   -
6   -{% block main-content %}
7   - <h2>{% trans 'Community Blogs' %}</h2>
8   - <hr/>
9   -
10   - <div id="planet" class="row">
11   - <div class="col-lg-9 col-md-8 col-sm-12">
12   - {% block feedzilla_content %}{% endblock %}
13   - </div>
14   -
15   - <div class="col-lg-3 col-md-4 col-sm-12">
16   - <div class="well">
17   - <h3>{% trans 'Tags' %}</h3>
18   - {% feedzilla_tag_cloud %}
19   - </div>
20   - <div class="well">
21   - <h3>{% trans 'Source Blogs' %}</h3>
22   - {% feedzilla_donor_list order_by="title" %}
23   - {% if user.is_authenticated %}
24   - <div class="text-center">
25   - <a class="btn btn-primary" href="{% url "feedzilla_submit_blog" %}">{% trans "Submit a blog" %}</a>
26   - </div>
27   - {% endif %}
28   - </div>
29   - </div>
30   - </div>
31   -
32   -{% endblock %}
colab/planet/templates/feedzilla/index.html
... ... @@ -1,20 +0,0 @@
1   -{% extends 'feedzilla/base.html' %}
2   -{% load i18n %}
3   -
4   -{% block feedzilla_content %}
5   -
6   -{% for post in page.object_list %}
7   - {% include 'feedzilla/_post_template.html' %}
8   - <hr>
9   - {% empty %}
10   - <h2>{% trans 'There is no RSS registered' %}</h2>
11   - <h3>
12   - {% trans 'Please' %}
13   - <a href="{% url "feedzilla_submit_blog" %}">{% trans 'click here' %}</a>
14   - {% trans 'to submit a blog' %}</h3>
15   - </h3>
16   -{% endfor %}
17   -
18   -{% include "common/pagination.html" %}
19   -
20   -{% endblock %}
colab/planet/templates/feedzilla/submit_blog.html
... ... @@ -1,37 +0,0 @@
1   -{% extends 'feedzilla/base.html' %}
2   -{% load i18n %}
3   -
4   -{% block feedzilla_content %}
5   -<h1>{% trans "Submit a blog" %}</h1>
6   -
7   -{% if success %}
8   -<p>{% trans "Thank you. Your application has been accepted and will be reviewed by admin in the near time." %}</p>
9   -{% else %}
10   -<form method="post" class="common-form">
11   - {% csrf_token %}
12   -
13   - <div class="row">
14   - {% for field in form %}
15   - <div class="col-lg-6 col-md-6 col-sm-12 col-xm-12">
16   - <div class="form-group{% if field.field.required %} required{% endif %}{% if field.errors %} alert alert-danger has-error{% endif %}">
17   - <label for="{{ field.name }}" class="control-label">
18   - {{ field.label }}
19   - </label>
20   - <input id="id_{{ field.name }}" name="{{ field.name }}" type="text" class="form-control" />
21   - {{ field.errors }}
22   - </div>
23   - </div>
24   - {% endfor %}
25   - </div>
26   -
27   - <div class="row">
28   - <div class="col-lg-12 text-center">
29   - <button class="btn btn-primary btn-lg">{% trans "Submit" %}</button>
30   - </div>
31   - </div>
32   -
33   - <br>
34   -
35   -</form>
36   -{% endif %}
37   -{% endblock %}
colab/planet/templates/feedzilla/tag.html
... ... @@ -1,19 +0,0 @@
1   -{% extends 'feedzilla/base.html' %}
2   -{% load i18n %}
3   -
4   -{% block feedzilla_content %}
5   -
6   -<div class="col-lg-9">
7   - <h3>{% block title %}{% blocktrans %}Posts with &laquo;{{ tag }}&raquo; label{% endblocktrans %}{% endblock title %}</h3>
8   - <hr>
9   - {% if page.object_list %}
10   - {% for post in page.object_list %}
11   - {% include 'feedzilla/_post_template.html' %}
12   - <hr>
13   - {% endfor %}
14   - {% include "pagination.html" %}
15   - {% else %}
16   - <p>{% trans "No posts with such label" %}</p>
17   - {% endif %}
18   -</div>
19   -{% endblock %}
colab/planet/tests.py
... ... @@ -1,4 +0,0 @@
1   -# uncomment the import if you really use.
2   -# from django.test import TestCase
3   -
4   -# Create your tests here.
colab/planet/views.py
... ... @@ -1,4 +0,0 @@
1   -# uncomment the import if you really use.
2   -# from django.shortcuts import render
3   -
4   -# Create your views here.
colab/proxy/templatetags/proxy.py
... ... @@ -41,7 +41,8 @@ def proxy_menu(context):
41 41 menu_links[title] = []
42 42  
43 43 for text, link in links:
44   - menu_links[title].append((text, link))
  44 + url = link
  45 + menu_links[title].append((text, url))
45 46  
46 47 menu = render_to_string('proxy/menu_template.html',
47 48 {'menu_links': menu_links})
... ...
colab/settings.py
... ... @@ -58,7 +58,6 @@ INSTALLED_APPS = (
58 58 'colab.super_archives',
59 59 'colab.api',
60 60 'colab.rss',
61   - 'colab.planet',
62 61 'colab.search',
63 62 'colab.badger',
64 63 'colab.tz',
... ... @@ -201,7 +200,6 @@ TEMPLATE_CONTEXT_PROCESSORS = (
201 200 'colab.home.context_processors.ribbon',
202 201 'colab.home.context_processors.google_analytics',
203 202 'colab.home.context_processors.browserid_enabled',
204   - 'colab.planet.context_processors.feedzilla',
205 203 )
206 204  
207 205 MIDDLEWARE_CLASSES = (
... ... @@ -255,14 +253,6 @@ SUPER_ARCHIVES_PATH = &#39;/var/lib/mailman/archives/private&#39;
255 253 SUPER_ARCHIVES_EXCLUDE = []
256 254 SUPER_ARCHIVES_LOCK_FILE = '/var/lock/colab/import_emails.lock'
257 255  
258   -# Feedzilla (planet)
259   -from feedzilla.settings import * # noqa (flake8 ignore)
260   -FEEDZILLA_PAGE_SIZE = 5
261   -FEEDZILLA_SITE_TITLE = _(u'Planet Colab')
262   -FEEDZILLA_SITE_DESCRIPTION = _(u'Colab blog aggregator')
263   -
264   -FEEDZILLA_ENABLED = True
265   -
266 256 # Mailman API settings
267 257 MAILMAN_API_URL = 'http://localhost:8124'
268 258  
... ... @@ -299,13 +289,6 @@ if locals().get(&#39;RAVEN_DSN&#39;, False):
299 289 }
300 290 INSTALLED_APPS += ('raven.contrib.django.raven_compat',)
301 291  
302   -if FEEDZILLA_ENABLED:
303   - INSTALLED_APPS += (
304   - # Feedzilla and deps
305   - 'feedzilla',
306   - 'common',
307   - )
308   -
309 292 BROWSERID_ENABLED = locals().get('BROWSERID_ENABLED') or False
310 293 SOCIAL_NETWORK_ENABLED = locals().get('SOCIAL_NETWORK_ENABLED') or False
311 294  
... ... @@ -317,13 +300,24 @@ for app_label in PROXIED_APPS.keys():
317 300 COLAB_APPS = locals().get('COLAB_APPS') or {}
318 301  
319 302 for app_name, app in COLAB_APPS.items():
320   - INSTALLED_APPS += (app_name,)
  303 + if 'dependencies' in app:
  304 + for dep in app.get('dependencies'):
  305 + if dep not in INSTALLED_APPS:
  306 + INSTALLED_APPS += (dep,)
  307 +
  308 + if app_name not in INSTALLED_APPS:
  309 + INSTALLED_APPS += (app_name,)
321 310  
322 311 if not app or 'templates' not in app:
323 312 continue
324 313  
325 314 template = app.get('templates')
326 315  
  316 + if 'context_processors' in app:
  317 + for context_processor in app.get('context_processors'):
  318 + if context_processor not in TEMPLATE_CONTEXT_PROCESSORS:
  319 + TEMPLATE_CONTEXT_PROCESSORS += (context_processor,)
  320 +
327 321 if template.get('staticdir'):
328 322 STATICFILES_DIRS += (template.get('staticdir'),)
329 323 if template.get('templatesdir'):
... ...
colab/static/css/screen.css
... ... @@ -357,35 +357,6 @@ ul.unstyled-list .glyphicon-chevron-right {
357 357 /* End of Converse JS*/
358 358  
359 359  
360   -/* Feedzilla */
361   -
362   -#planet .well h3 {
363   - margin-top: 0;
364   -}
365   -
366   -.tag-cloud {
367   - text-align: justify;
368   - margin-top: 6px;
369   -}
370   -
371   -.tag-cloud .size-1 {
372   - font-size: 0.9em;
373   -}
374   -
375   -.tag-cloud .size-2 {
376   - font-size: 1.2em;
377   -}
378   -
379   -.tag-cloud .size-3 {
380   - font-size: 1.4em;
381   -}
382   -
383   -.tag-cloud .size-4 {
384   - font-size: 1.6em;
385   -}
386   -
387   -/* end Feedzilla */
388   -
389 360 /* user profile update */
390 361  
391 362 .btn.delete-email:not(:hover) {
... ...
colab/templates/base.html
... ... @@ -90,16 +90,8 @@
90 90 <a href="{% url 'thread_list' %}">{% trans "Groups" %}</a>
91 91 </li>
92 92  
93   - {% if feedzilla %}
94   - <li>
95   - <a href="{% url "feedzilla_index" %}">{% trans "Blogs" %}</a>
96   - </li>
97   - {% endif %}
98   -
99 93 {% proxy_menu %}
100 94  
101   - <li><a href="/paste">{% trans "Paste" %}</a></li>
102   -
103 95 <li class="hidden-lg hidden-md">
104 96 <a href="{% url 'haystack_search' %}?q=">{% trans "Search" %}</a>
105 97 </li>
... ...
setup.py
... ... @@ -25,6 +25,7 @@ REQUIREMENTS = [
25 25 'gunicorn==19.1.0',
26 26 'eventlet==0.15.2',
27 27 'PyYAML==3.11',
  28 + 'yamlordereddictloader=0.1.1'
28 29  
29 30 # Deps for sentry client (raven)
30 31 'raven==3.5.2',
... ... @@ -38,7 +39,6 @@ REQUIREMENTS = [
38 39 'django-conversejs==0.3.4',
39 40  
40 41 # Feedzilla (planet) and deps
41   - 'feedzilla==0.24',
42 42 'django-common==0.1.51',
43 43 'feedparser==5.1.3',
44 44 'lxml==3.2.4',
... ...