{% load i18n %}
{% block repo-zones-nav %}
- <a {% if division = "new" %}class="active" {% endif %}href="{% url list_new %}">{% trans "New" %}</a>
- <a {% if division = "unpublished" %}class="active" {% endif %}href="{% url list_unpublished %}">{% trans "Unpublished" %}</a>
- <a {% if division = "publishing" %}class="active" {% endif %}href="{% url list_publishing %}">{% trans "Publishing" %}</a>
- <a {% if division = "published" %}class="active" {% endif %}href="{% url list_published %}">{% trans "Published" %}</a>
- <a {% if division = "unmanaged" %}class="active" {% endif %}href="{% url list_unmanaged %}">{% trans "Archive" %}</a>
+ <a {% if division = "new" %}class="active" {% endif %}href="{% url 'list_new' %}">{% trans "New" %}</a>
+ <a {% if division = "unpublished" %}class="active" {% endif %}href="{% url 'list_unpublished' %}">{% trans "Unpublished" %}</a>
+ <a {% if division = "publishing" %}class="active" {% endif %}href="{% url 'list_publishing' %}">{% trans "Publishing" %}</a>
+ <a {% if division = "published" %}class="active" {% endif %}href="{% url 'list_published' %}">{% trans "Published" %}</a>
+ <a {% if division = "unmanaged" %}class="active" {% endif %}href="{% url 'list_unmanaged' %}">{% trans "Archive" %}</a>
{% if user.is_staff %}
- <a href='{% url admin:archive_project_changelist %}'>{% trans "Projects" %}</a>
+ <a href='{% url "admin:archive_project_changelist" %}'>{% trans "Projects" %}</a>
{% endif %}
{% if user.is_authenticated %}
- <a href="{% url logout %}" style='float: right;'>{% trans "Logout" %}</a>
+ <a href="{% url 'logout' %}" style='float: right;'>{% trans "Logout" %}</a>
{% else %}
- <a href="{% url login %}" style='float: right;'>{% trans "Login" %}</a>
+ <a href="{% url 'login' %}" style='float: right;'>{% trans "Login" %}</a>
{% endif %}
{% if user.is_staff %}
- <a href='{% url admin:index %}' style='float: right;'>{% trans "Administration" %}</a>
+ <a href='{% url "admin:index" %}' style='float: right;'>{% trans "Administration" %}</a>
{% endif %}
{% if user.is_authenticated %}
<span style='float: right;'>{{ user }}</span>
{% block content %}
-<p>Plik źródłowy: <a href='{% url download audiobook.id %}'>{{ path }}</a>
+<p>Plik źródłowy: <a href='{% url "download" audiobook.id %}'>{{ path }}</a>
(sha1: <tt>{{ audiobook.source_sha1 }}</tt>).
</p>
<h2>{% trans "Publishing pending" %}</h2>
-<form method="post" action="{% url cancel_publishing audiobook.id %}">
+<form method="post" action="{% url 'cancel_publishing' audiobook.id %}">
{% csrf_token %}
<input type="submit" value="{% trans "Cancel publishing" %}" />
</form>
{% tags_table audiobook.new_publish_tags 0 %}
<tr><th></th><td>
- <form method="post" action="{% url publish audiobook.id %}">
+ <form method="post" action="{% url 'publish' audiobook.id %}">
{% csrf_token %}
<input type="submit" value="{% trans "Publish" %}" />
</form>
{% if not audiobook.mp3_published or not audiobook.ogg_published %}
- <form method="post" action="{% url convert audiobook.id %}">
+ <form method="post" action="{% url 'convert' audiobook.id %}">
{% csrf_token %}
<input type="submit" value="{% trans "Convert without publishing" %}" />
</form>
<hr/>
{% if audiobook.mp3_file %}
<h2>{% trans "MP3 file" %}</h2>
- <p><a href="{% url download audiobook.id 'mp3' %}">{% trans "Download MP3 file." %}</a></p>
+ <p><a href="{% url 'download' audiobook.id 'mp3' %}">{% trans "Download MP3 file." %}</a></p>
{% if audiobook.mp3_published %}
<p>{% trans "Published:" %} {{ audiobook.mp3_published }}</a></p>
{% if audiobook.mp3_published_tags.tags %}
<hr/>
{% if audiobook.ogg_file %}
<h2>{% trans "Ogg Vorbis file" %}</h2>
- <p><a href="{% url download audiobook.id 'ogg' %}">{% trans "Download Ogg Vorbis file." %}</a></p>
+ <p><a href="{% url 'download' audiobook.id 'ogg' %}">{% trans "Download Ogg Vorbis file." %}</a></p>
{% if audiobook.ogg_published %}
<p>{% trans "Published:" %} {{ audiobook.ogg_published }}</a></p>
{% if audiobook.ogg_published_tags.tags %}
-<form method="post" action="{% url remove_to_archive audiobook.id %}"
+<form method="post" action="{% url 'remove_to_archive' audiobook.id %}"
onsubmit='return confirm("{% trans "Are you sure you want to move this audiobook to archive?" %}")'>
{% csrf_token %}
<input type="submit" value="{% trans "Remove to archive" %}" />
{% block content %}
-<form method="post" action="{% url move_to_archive filename %}">
+<form method="post" action="{% url 'move_to_archive' filename %}">
{% csrf_token %}
<input type="submit" value="{% trans "Move to archive" %}" />
</form>
</ul>
-<form method="post" action="{% url move_to_new filename %}">
+<form method="post" action="{% url 'move_to_new' filename %}">
{% csrf_token %}
<input type="submit" value="{% trans "Move to new files" %}" />
</form>
{% block file-list %}
{% for file in objects %}
<li>
- <a href='{% url file_new file|urlencode %}'>{{ file }}</a>
+ <a href='{% url "file_new" file|urlencode %}'>{{ file }}</a>
</li>
{% endfor %}
{% endblock %}
{% block file-list %}
{% for file in objects %}
<li>
- <a href='{% url file file.id %}'>{{ file }}</a>
+ <a href='{% url "file" file.id %}'>{{ file }}</a>
</li>
{% endfor %}
{% endblock %}
<ul>
{% for file in objects %}
<li>
- <a href='{% url file file.id %}'>{{ file }}</a>
+ <a href='{% url "file" file.id %}'>{{ file }}</a>
({% if file.mp3_status = k.0 %}MP3{% if file.ogg_status = k.0 %}, {% endif %}{% endif %}{% if file.ogg_status = k.0 %}Ogg{% endif %})
</li>
{% endfor %}
{% block file-list %}
{% for file in objects %}
<li>
- <a href='{% url file_unmanaged file|urlencode %}'>{{ file }}</a>
+ <a href='{% url "file_unmanaged" file|urlencode %}'>{{ file }}</a>
</li>
{% endfor %}
{% endblock %}
{% block file-list %}
{% for file in objects %}
<li>
- <a href='{% url file file.id %}'>{{ file }}</a>
+ <a href='{% url "file" file.id %}'>{{ file }}</a>
{% if file.mp3_published %}
<span class="list-published-tag" title="{{ file.mp3_published }}">MP3</span>
-from django.conf.urls.defaults import patterns, include, url
+from django.conf.urls import patterns, include, url
+from django.views.generic import RedirectView
urlpatterns = patterns('',
- url(r'^$', 'django.views.generic.simple.redirect_to', {'url': 'new/'}),
+ url(r'^$', RedirectView.as_view(url='new/')),
url(r'^new/$', 'archive.views.list_new', name="list_new"),
url(r'^new/(.+)/$', 'archive.views.file_new', name="file_new"),
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
+ 'filters': {
+ 'require_debug_false': {
+ '()': 'django.utils.log.RequireDebugFalse'
+ }
+ },
'handlers': {
'mail_admins': {
'level': 'ERROR',
+ 'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
}
},
from django.conf import settings
-from django.conf.urls.defaults import patterns, include, url
+from django.conf.urls import patterns, include, url
+from django.views.generic import RedirectView
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
- url(r'^$', 'django.views.generic.simple.redirect_to', {'url': 'archive/'}),
+ url(r'^$', RedirectView.as_view(url='archive/')),
url(r'^archive/', include('archive.urls')),
url(r'^admin/', include(admin.site.urls)),
-django>=1.3,<1.4
+-i http://pypi.nowoczesnapolska.org.pl/simple
+
+django>=1.5,<1.6
django-jsonfield
South>=0.7
-django-cas
+django-cas=2.1.1.1
django-celery
django-kombu