Skip to content

Commit

Permalink
Merge branch 'release/v0.5.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Fantomas42 committed Sep 29, 2016
2 parents 7b288b2 + 6a2647c commit 8a8fec2
Show file tree
Hide file tree
Showing 11 changed files with 78 additions and 102 deletions.
2 changes: 1 addition & 1 deletion buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ show-picked-versions = true
eggs = django
django-blog-zinnia
django-app-namespace-template-loader
Pillow
pillow
extensions = gp.vcsdevelop
develop-dir = django-apps-src
vcs-update = true
Expand Down
49 changes: 28 additions & 21 deletions demo_zinnia_bootstrap/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
gettext = lambda s: s

DEBUG = True
TEMPLATE_DEBUG = DEBUG

DATABASES = {'default':
{'ENGINE': 'django.db.backends.sqlite3',
Expand Down Expand Up @@ -47,36 +46,46 @@
('ca', gettext('Catalan')),
('tr', gettext('Turkish')),
('sv', gettext('Swedish')),
('is', gettext('Icelandic')),
('hr_HR', gettext('Croatian')),
('pt_BR', gettext('Brazilian Portuguese')),
('fi_FI', gettext('Finnish (Finland)')),
('zh_CN', gettext('Simplified Chinese')),
('fa_IR', gettext('Persian')),
('fi_FI', gettext('Finnish')),
('uk_UA', gettext('Ukrainian')),
('zh-hans', gettext('Simplified Chinese')),
)

MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.admindocs.middleware.XViewMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
)
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'demo_zinnia_bootstrap.urls'

TEMPLATE_LOADERS = (
'app_namespace.Loader',
'django.template.loaders.app_directories.Loader'
)

TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.core.context_processors.i18n',
'django.core.context_processors.request',
'django.contrib.messages.context_processors.messages',
'zinnia.context_processors.version',
)
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'OPTIONS': {
'loaders': [
'app_namespace.Loader',
'django.template.loaders.app_directories.Loader',
],
'context_processors': [
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.i18n',
'django.template.context_processors.request',
'django.contrib.messages.context_processors.messages',
'zinnia.context_processors.version',
]
}
}
]

INSTALLED_APPS = (
'django.contrib.auth',
Expand All @@ -94,5 +103,3 @@
'zinnia_bootstrap',
'zinnia',
)

SILENCED_SYSTEM_CHECKS = ['1_6.W001']
3 changes: 1 addition & 2 deletions demo_zinnia_bootstrap/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@
from zinnia.sitemaps import CategorySitemap
from zinnia.sitemaps import AuthorSitemap

admin.autodiscover()

urlpatterns = [
url(r'^$', RedirectView.as_view(url='/blog/', permanent=True)),
url(r'^blog/', include('zinnia.urls', namespace='zinnia')),
url(r'^comments/', include('django_comments.urls')),
url(r'^i18n/', include('django.conf.urls.i18n')),
url(r'^admin/', include(admin.site.urls)),
url(r'^admin/', admin.site.urls),
]

sitemaps = {
Expand Down
33 changes: 18 additions & 15 deletions versions.cfg
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
[versions]
beautifulsoup4 = 4.4.1
beautifulsoup4 = 4.5.1
buildout-versions-checker = 1.9.3
django = 1.9.6
django-app-namespace-template-loader = 0.4
django-contrib-comments = 1.7.0
django-mptt = 0.8.2
django-tagging = 0.4.3
configparser = 3.5.0
django = 1.10.1
django-app-namespace-template-loader = 0.4.1
django-contrib-comments = 1.7.3
django-mptt = 0.8.6
django-tagging = 0.4.5
django-xmlrpc = 0.1.5
djangorecipe = 2.1.2
flake8 = 2.5.4
djangorecipe = 2.2.1
enum34 = 1.1.6
flake8 = 3.0.4
futures = 3.0.5
gp.vcsdevelop = 2.2.3
mccabe = 0.4.0
mccabe = 0.5.2
mots-vides = 2015.5.11
packaging = 16.7
pep8 = 1.7.0
pillow = 3.2.0
pyflakes = 1.0.0
pyparsing = 2.1.1
pytz = 2016.4
pillow = 3.3.1
pycodestyle = 2.0.0
pyflakes = 1.2.3
pyparsing = 2.1.9
pytz = 2016.6.1
regex = 2016.9.22
six = 1.10.0
zc.buildout = 2.5.1
zc.buildout = 2.5.3
zc.recipe.egg = 2.0.3
2 changes: 1 addition & 1 deletion zinnia_bootstrap/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""zinnia_bootstrap"""
__version__ = '0.5'
__version__ = '0.5.1'
__license__ = 'BSD License'

__author__ = 'Fantomas42'
Expand Down
2 changes: 1 addition & 1 deletion zinnia_bootstrap/templates/zinnia/_entry_detail_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h2 class="entry-title">
{% endwith %}
{% endblock entry-authors %}
{% block entry-published %}
<time class="published" datetime="{{ object.creation_date|date:"c" }}" pubdate="pubdate">{{ object.creation_date|date:"DATE_FORMAT" }}</time>
<time class="published" datetime="{{ object.publication_date|date:"c" }}" pubdate="pubdate">{{ object.publication_date|date:"DATE_FORMAT" }}</time>
{% endblock entry-published %}
{% block entry-categories %}
{% with categories=object.categories.all %}
Expand Down
2 changes: 1 addition & 1 deletion zinnia_bootstrap/templates/zinnia/author_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% load i18n %}

{% block content %}
<h2>{% trans "Author list" %}</h2>
<h1>{% trans "Author list" %}</h1>

<ul class="list-group">
{% for object in object_list %}
Expand Down
27 changes: 11 additions & 16 deletions zinnia_bootstrap/templates/zinnia/category_list.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
{% extends "zinnia:zinnia/category_list.html" %}
{% load i18n mptt_tags %}
{% load i18n %}

{% block content %}
<h2>{% trans "Category list" %}</h2>
<h1>{% trans "Category list" %}</h1>

<ul class="category-root list-group">
{% recursetree object_list %}
<ul class="list-group">
{% for object in object_list %}
<li class="list-group-item">
<a href="{{ node.get_absolute_url }}" title="{% blocktrans with category=node %}Show all entries in {{ category }}{% endblocktrans %}">{{ node }}</a>
<a href="{{ object.get_absolute_url }}"
title="{% blocktrans with category=object %}Show all entries in {{ category }}{% endblocktrans %}">{{ object }}</a>
<span class="badge">
{% blocktrans count entry_count=node.entries_published.count %}{{ entry_count }} entry{% plural %}{{ entry_count }} entries{% endblocktrans %}
{% blocktrans count entry_count=object.count_entries_published %}{{ entry_count }} entry{% plural %}{{ entry_count }} entries{% endblocktrans %}
</span>
{% if node.description %}<p>{{ node.description|striptags|safe }}</p>{% endif %}
{% if not node.is_leaf_node %}
<ul class="category-children category-{{ node.slug }}">
{{ children }}
</ul>
{% endif %}
{% if object.description %}<p>{{ object.description|striptags|safe }}</p>{% endif %}
</li>
{% endrecursetree %}
{% if not object_list %}
<li class="list-group-item">
{% empty %}
<li>
{% trans "No categories yet." %}
</li>
{% endif %}
{% endfor %}
</ul>
{% endblock content %}
13 changes: 11 additions & 2 deletions zinnia_bootstrap/templates/zinnia/entry_search.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,32 @@
{% load i18n zinnia %}

{% block content-title %}
<h1>{% trans "Search results for" %} '{{ pattern }}'</h1>
<h1>{% blocktrans %}Search results for '{{ pattern }}'{% endblocktrans %}</h1>

{% if error %}
<p class="alert alert-error">{{ error }}</p>
{% else %}
<p class="feed">
<span class="glyphicon glyphicon-list-alt"></span>
<a href="{% url 'zinnia:entry_search_feed' %}?pattern={{ pattern }}" title="{% blocktrans %}RSS feed of search results for '{{ pattern }}'{% endblocktrans %}">
{% blocktrans %}RSS feed of search results for '{{ pattern }}'{% endblocktrans %}
</a>
</p>
{% endif %}

{% if object_list %}
<p class="alert alert-success">
{% blocktrans count entry_count=paginator.count %}{{ entry_count }} entry found{% plural %}{{ entry_count }} entries found{% endblocktrans %}
</p>
{% endif %}

{% endblock content-title %}

{% block content-loop %}
{% if not error %}
{% for object in object_list %}
{% include object.content_template with object_content=object.html_preview continue_reading=1 %}
{% zinnia_loop_template object.content_template as template %}
{% include template with object_content=object.html_preview continue_reading=1 %}
{% empty %}
<p class="alert alert-info">{% trans "Nothing found." %}</p>
{% endfor %}
Expand Down
45 changes: 4 additions & 41 deletions zinnia_bootstrap/templates/zinnia/sitemap.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
{% load i18n zinnia mptt_tags %}

{% block content %}
<h2>{% trans "Sitemap" %}</h2>
<h1>{% trans "Sitemap" %}</h1>

<div class="entriesbycategories">
<h3>{% trans "Entries per categories" %}</h3>
<h2>{% trans "Entries per categories" %}</h2>
{% for category in categories %}
<h4>{{ category }}</h4>
<h3>{{ category }}</h3>
<ul class="list-group">
{% for entry in category.entries_published.all %}
<li class="list-group-item">
Expand All @@ -27,45 +27,8 @@ <h4>{{ category }}</h4>
{% endfor %}
</div>

<div class="allentries">
<h3>{% trans "All the entries" %}</h3>
<ul class="list-group">
{% for entry in entries %}
<li class="list-group-item">
<a href="{{ entry.get_absolute_url }}" title="{{ entry.title }}" rel="bookmark">{{ entry.title }}</a>
- {{ entry.creation_date|date:"SHORT_DATE_FORMAT" }}
{% with comment_count=entry.comments.count %}
<span class="badge">
{{ comment_count }} {% trans "comment" %}{{ comment_count|pluralize }}
</span>
{% endwith %}
</li>
{% empty %}
<li class="list-group-item">
{% trans "No entries yet." %}
</li>
{% endfor %}
</ul>
</div>

<div class="categories">
<h3>{% trans "Categories" %}</h3>
{% for category, structure in categories|tree_info %}
{% if structure.new_level %}<ul class="list-group"><li class="list-group-item">{% else %}</li><li class="list-group-item">{% endif %}
<a href="{{ category.get_absolute_url }}" title="{{ category.title }}">{{ category.title }}</a>
<span class="badge">{% blocktrans count entry_count=category.entries_published.count %}{{ entry_count }} entry{% plural %}{{ entry_count }} entries{% endblocktrans %}</span>
{% for level in structure.closed_levels %}</li></ul>{% endfor %}
{% empty %}
<ul class="list-group">
<li class="list-group-item">
{% trans "No categories yet." %}
</li>
</ul>
{% endfor %}
</div>

<div class="montharchives">
<h3>{% trans "Monthly archives" %}</h3>
<h2>{% trans "Monthly archives" %}</h2>
{% get_archives_entries %}
</div>
{% endblock content %}
2 changes: 1 addition & 1 deletion zinnia_bootstrap/templates/zinnia/tag_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% load i18n %}

{% block content %}
<h2>{% trans "Tag list" %}</h2>
<h1>{% trans "Tag list" %}</h1>

<ul class="list-group">
{% for object in object_list %}
Expand Down

0 comments on commit 8a8fec2

Please sign in to comment.