Commit 2e69933197fb2066cab9cfa318a029e4746288f9
1 parent
03734538
Exists in
master
and in
39 other branches
Adding feedzilla as blog aggregator
Showing
12 changed files
with
138 additions
and
0 deletions
Show diff stats
requirements.txt
src/colab/custom_settings.py
@@ -16,6 +16,7 @@ LANGUAGES = ( | @@ -16,6 +16,7 @@ LANGUAGES = ( | ||
16 | LANGUAGE_CODE = 'pt-br' | 16 | LANGUAGE_CODE = 'pt-br' |
17 | 17 | ||
18 | INSTALLED_APPS = INSTALLED_APPS + ( | 18 | INSTALLED_APPS = INSTALLED_APPS + ( |
19 | + | ||
19 | # Not standard apps | 20 | # Not standard apps |
20 | 'south', | 21 | 'south', |
21 | 'cliauth', | 22 | 'cliauth', |
@@ -25,6 +26,12 @@ INSTALLED_APPS = INSTALLED_APPS + ( | @@ -25,6 +26,12 @@ INSTALLED_APPS = INSTALLED_APPS + ( | ||
25 | 'api', | 26 | 'api', |
26 | 'rss', | 27 | 'rss', |
27 | 'colab.deprecated', | 28 | 'colab.deprecated', |
29 | + 'planet', | ||
30 | + | ||
31 | + # Feedzilla and deps | ||
32 | + 'feedzilla', | ||
33 | + 'tagging', | ||
34 | + 'common', | ||
28 | ) | 35 | ) |
29 | 36 | ||
30 | LOGGING = { | 37 | LOGGING = { |
@@ -87,6 +94,11 @@ STATICFILES_DIRS = ( | @@ -87,6 +94,11 @@ STATICFILES_DIRS = ( | ||
87 | os.path.join(BASE_DIR, 'colab', 'static'), | 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 | try: | 102 | try: |
91 | from local_settings import * | 103 | from local_settings import * |
92 | except ImportError: | 104 | except ImportError: |
src/colab/urls.py
@@ -51,6 +51,8 @@ urlpatterns = patterns('', | @@ -51,6 +51,8 @@ urlpatterns = patterns('', | ||
51 | 51 | ||
52 | url(r'^account/logout/$', 'django.contrib.auth.views.logout', | 52 | url(r'^account/logout/$', 'django.contrib.auth.views.logout', |
53 | {'next_page': '/'}, name='logout'), | 53 | {'next_page': '/'}, name='logout'), |
54 | + | ||
55 | + url(r'^planet/', include('feedzilla.urls')), | ||
54 | 56 | ||
55 | # Uncomment the next line to enable the admin: | 57 | # Uncomment the next line to enable the admin: |
56 | url(r'^colab/admin/', include(admin.site.urls)), | 58 | url(r'^colab/admin/', include(admin.site.urls)), |
No preview for this file type
@@ -0,0 +1,42 @@ | @@ -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" |
@@ -0,0 +1,38 @@ | @@ -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 }}">« {% trans "previous" %}</a> | ||
6 | + {% else %} | ||
7 | + <span class="control">« {% 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" %} »</a> | ||
32 | + {% else %} | ||
33 | + <span class="control">{% trans "next" %} »</span> | ||
34 | + {% endif %} | ||
35 | + | ||
36 | + <div class="clear"></div> | ||
37 | +</div> | ||
38 | +{% endif %} |
@@ -0,0 +1,26 @@ | @@ -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 %} |