From 87b5369dbceb64bd3979c3fe5c3542727f15547a Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Fri, 5 Sep 2014 16:26:23 +0200 Subject: [PATCH] goto Django 1.6.7 --- telemeta/forms/format.py | 2 +- telemeta/templates/postman/base.html | 10 ++-- telemeta/templates/postman/base_folder.html | 8 ++-- telemeta/templates/postman/view.html | 8 ++-- telemeta/templates/telemeta/admin.html | 2 +- .../telemeta/admin_enumerations.html | 2 +- .../templates/telemeta/admin_general.html | 2 +- telemeta/templates/telemeta/base.html | 48 +++++++++---------- telemeta/templates/telemeta/collection.m3u | 2 +- .../templates/telemeta/collection_add.html | 4 +- .../templates/telemeta/collection_detail.html | 24 +++++----- .../telemeta/collection_detail_dc.html | 6 +-- .../templates/telemeta/collection_edit.html | 6 +-- .../templates/telemeta/collection_list.html | 10 ++-- .../telemeta/collection_related_edit.html | 4 +- .../templates/telemeta/collection_xspf.xml | 6 +-- telemeta/templates/telemeta/country_info.html | 4 +- .../templates/telemeta/enumeration_edit.html | 8 ++-- .../telemeta/enumeration_edit_value.html | 10 ++-- .../templates/telemeta/geo_continents.html | 4 +- .../templates/telemeta/geo_countries.html | 6 +-- .../telemeta/geo_country_collections.html | 4 +- .../templates/telemeta/geo_country_items.html | 4 +- telemeta/templates/telemeta/home.html | 6 +-- .../templates/telemeta/inc/children_list.html | 2 +- .../telemeta/inc/collection_list.html | 2 +- .../telemeta/inc/collection_related.html | 6 +-- .../templates/telemeta/inc/dublincore.html | 8 ++-- .../telemeta/inc/mediaitem_list.html | 4 +- .../telemeta/inc/mediaitem_related.html | 6 +-- .../telemeta/inc/module_revisions.html | 14 +++--- .../telemeta/inc/module_searches.html | 2 +- .../telemeta/inc/module_user_revisions.html | 4 +- .../templates/telemeta/inc/resource_list.html | 2 +- .../telemeta/inc/resource_related.html | 6 +-- .../templates/telemeta/inc/user_list.html | 2 +- .../telemeta/instrument_alias_edit.html | 6 +-- .../telemeta/instrument_alias_edit_value.html | 10 ++-- .../templates/telemeta/instrument_edit.html | 6 +-- .../telemeta/instrument_edit_value.html | 10 ++-- telemeta/templates/telemeta/lists.html | 12 ++--- telemeta/templates/telemeta/login.html | 4 +- .../templates/telemeta/mediaitem_add.html | 4 +- .../templates/telemeta/mediaitem_copy.html | 4 +- .../templates/telemeta/mediaitem_detail.html | 34 ++++++------- .../telemeta/mediaitem_detail_dc.html | 4 +- .../templates/telemeta/mediaitem_edit.html | 10 ++-- .../telemeta/mediaitem_keywords_edit.html | 4 +- .../templates/telemeta/mediaitem_list.html | 10 ++-- .../telemeta/mediaitem_performances_edit.html | 4 +- .../templates/telemeta/mediaitem_player.html | 2 +- .../telemeta/mediaitem_player_contour.html | 2 +- .../telemeta/mediaitem_related_edit.html | 4 +- .../templates/telemeta/mediaitem_xspf.xml | 4 +- .../templates/telemeta/profile_detail.html | 4 +- telemeta/templates/telemeta/profile_edit.html | 4 +- .../registration/password_change_done.html | 2 +- .../registration/password_change_form.html | 2 +- .../registration/password_reset_email.html | 2 +- .../templates/telemeta/resource_detail.html | 14 +++--- .../telemeta/resource_detail_dc.html | 4 +- .../templates/telemeta/resource_edit.html | 6 +-- .../templates/telemeta/resource_list.html | 2 +- .../telemeta/resource_related_edit.html | 4 +- .../templates/telemeta/search_criteria.html | 4 +- .../templates/telemeta/search_results.html | 16 +++---- telemeta/urls.py | 36 +++++++------- telemeta/views/core.py | 3 +- 68 files changed, 242 insertions(+), 243 deletions(-) diff --git a/telemeta/forms/format.py b/telemeta/forms/format.py index fa3cc1c5..452df8e2 100644 --- a/telemeta/forms/format.py +++ b/telemeta/forms/format.py @@ -6,4 +6,4 @@ from telemeta.models import * class FormatForm(ModelForm): class Meta: model = Format - exclude = ('item') + exclude = ('item',) diff --git a/telemeta/templates/postman/base.html b/telemeta/templates/postman/base.html index c209be06..cf1246d8 100644 --- a/telemeta/templates/postman/base.html +++ b/telemeta/templates/postman/base.html @@ -9,10 +9,10 @@ {% block title_buttons %}
{% postman_unread as unread_count %} -{% trans "Inbox" %}{% if unread_count %} ({{ unread_count }}){% endif %} -{% trans "Sent Messages" %} -{% trans "Write" %} -{% trans "Archives" %} -{% trans "Trash" %} +{% trans "Inbox" %}{% if unread_count %} ({{ unread_count }}){% endif %} +{% trans "Sent Messages" %} +{% trans "Write" %} +{% trans "Archives" %} +{% trans "Trash" %}
{% endblock %} \ No newline at end of file diff --git a/telemeta/templates/postman/base_folder.html b/telemeta/templates/postman/base_folder.html index 7728819d..370f1171 100644 --- a/telemeta/templates/postman/base_folder.html +++ b/telemeta/templates/postman/base_folder.html @@ -34,7 +34,7 @@ {% block pm_recipient_cell %} {{ message.obfuscated_recipient|or_me:user }}{% if message.count %} ({{ message.count }}){% endif %}{% endblock %} {% if message.is_new %}{% endif %}{% if message.is_replied %}{% endif %} {% block pm_subject %} - + {% include "postman/inc_subject_ex.html" %} {% endblock %} @@ -46,9 +46,9 @@
{% block pm_form_buttons %} -{% block pm_delete_button %}{% endblock %} -{% block pm_archive_button %}{% endblock %} -{% block pm_undelete_button %}{% endblock %} +{% block pm_delete_button %}{% endblock %} +{% block pm_archive_button %}{% endblock %} +{% block pm_undelete_button %}{% endblock %} {% endblock %} diff --git a/telemeta/templates/postman/view.html b/telemeta/templates/postman/view.html index 23c7264c..81b28bca 100644 --- a/telemeta/templates/postman/view.html +++ b/telemeta/templates/postman/view.html @@ -22,14 +22,14 @@ {% trans "Back" %} - -{% if not archived %}{% endif %} + +{% if not archived %}{% endif %} -{% if reply_to_pk %}{% trans "Reply" %}{% endif %} +{% if reply_to_pk %}{% trans "Reply" %}{% endif %} {% if reply_to_pk %}

{% trans 'Reply' %}

-
{% csrf_token %} +{% csrf_token %}
{{ form.body }}
{% endif %} diff --git a/telemeta/templates/telemeta/admin.html b/telemeta/templates/telemeta/admin.html index 95facdc7..d9b1dd1b 100644 --- a/telemeta/templates/telemeta/admin.html +++ b/telemeta/templates/telemeta/admin.html @@ -8,7 +8,7 @@ {% endblock %} {% block title %} -

{% trans "Administration" %}

+

{% trans "Administration" %}

{% endblock %}
  • {% trans "General" %}
  • diff --git a/telemeta/templates/telemeta/admin_enumerations.html b/telemeta/templates/telemeta/admin_enumerations.html index c6352b7e..6cb3e58e 100644 --- a/telemeta/templates/telemeta/admin_enumerations.html +++ b/telemeta/templates/telemeta/admin_enumerations.html @@ -14,7 +14,7 @@ {% trans "Title"%} {% for enum in enumerations %} - + {% trans enum.name|capfirst %} {% endfor %} diff --git a/telemeta/templates/telemeta/admin_general.html b/telemeta/templates/telemeta/admin_general.html index 00bcfcce..c83baffe 100644 --- a/telemeta/templates/telemeta/admin_general.html +++ b/telemeta/templates/telemeta/admin_general.html @@ -6,5 +6,5 @@ {% endblock %} {% block tabcontents %} - @@ -24,7 +24,7 @@

    world {% trans "Geo Navigator" %}

    - + {% trans
    @@ -65,7 +65,7 @@ {% trans "Musical selection" %} {% for item in sound_pub_items %} -
    {{ item }}{% if item.alt_title %} ({{ item.alt_title }}){% endif %}
    {{ item.location.fullnames|to_string }}
    +
    {{ item }}{% if item.alt_title %} ({{ item.alt_title }}){% endif %}
    {{ item.location.fullnames|to_string }}
    {% endfor %}
    diff --git a/telemeta/templates/telemeta/inc/children_list.html b/telemeta/templates/telemeta/inc/children_list.html index 3f4764bf..0ebadcba 100644 --- a/telemeta/templates/telemeta/inc/children_list.html +++ b/telemeta/templates/telemeta/inc/children_list.html @@ -21,7 +21,7 @@ {% if child.code %} - {{ child.title }} + {{ child.title }} {{ child.descriptions }} {{ child.code }} diff --git a/telemeta/templates/telemeta/inc/collection_list.html b/telemeta/templates/telemeta/inc/collection_list.html index 24fe8cf5..2e90a6f7 100644 --- a/telemeta/templates/telemeta/inc/collection_list.html +++ b/telemeta/templates/telemeta/inc/collection_list.html @@ -20,7 +20,7 @@ {% for collection in collections %} - {{ collection.title }} + {{ collection.title }} {{ collection.code|default:collection.old_code }} diff --git a/telemeta/templates/telemeta/inc/collection_related.html b/telemeta/templates/telemeta/inc/collection_related.html index 0318bc91..997d9953 100644 --- a/telemeta/templates/telemeta/inc/collection_related.html +++ b/telemeta/templates/telemeta/inc/collection_related.html @@ -28,7 +28,7 @@ {{ media.url|get_filename }} {% endif %} {% else %} - + {% if media.title %} {{ media.title }} {% else %} @@ -44,7 +44,7 @@ {% if media.file %}
    {% trans "Download" %}
    - + {{ media.file|get_filename }}
    @@ -56,7 +56,7 @@ {% if media.is_image %} {% if media.file %} - + {% thumbnail media.file "x200" as im %} {% endthumbnail %} diff --git a/telemeta/templates/telemeta/inc/dublincore.html b/telemeta/templates/telemeta/inc/dublincore.html index 0256d1bc..82389c34 100644 --- a/telemeta/templates/telemeta/inc/dublincore.html +++ b/telemeta/templates/telemeta/inc/dublincore.html @@ -9,16 +9,16 @@
    {% if element.related|is_item or element.related|is_collection or element.related|is_resource %} {% if element.related|is_item %} - {{ element.value }} + {{ element.value }} {% endif %} {% if element.related|is_collection %} - {{ element.value }} + {{ element.value }} {% endif %} {% if element.related|is_corpus %} - {{ element.value }} + {{ element.value }} {% endif %} {% if element.related|is_fonds %} - {{ element.value }} + {{ element.value }} {% endif %} {% else %} {{ element.value }} diff --git a/telemeta/templates/telemeta/inc/mediaitem_list.html b/telemeta/templates/telemeta/inc/mediaitem_list.html index 6adf0d81..0b1a65d6 100644 --- a/telemeta/templates/telemeta/inc/mediaitem_list.html +++ b/telemeta/templates/telemeta/inc/mediaitem_list.html @@ -25,7 +25,7 @@ {% for item in items %} - {{ item }} + {{ item }} {{ item.code|default:item.old_code }} @@ -46,7 +46,7 @@ {% if item.file %} - + yes {% endif %} diff --git a/telemeta/templates/telemeta/inc/mediaitem_related.html b/telemeta/templates/telemeta/inc/mediaitem_related.html index 51f58dcd..9b2a980e 100644 --- a/telemeta/templates/telemeta/inc/mediaitem_related.html +++ b/telemeta/templates/telemeta/inc/mediaitem_related.html @@ -28,7 +28,7 @@ {{ media.url|get_filename }} {% endif %} {% else %} - + {% if media.title %} {{ media.title }} {% else %} @@ -44,7 +44,7 @@ {% if media.file %}
    {% trans "Download" %}
    - + {{ media.file|get_filename }}
    @@ -55,7 +55,7 @@ {% if media.is_image %} {% if media.file %} - + {% thumbnail media.file "x200" as im %} {% endthumbnail %} diff --git a/telemeta/templates/telemeta/inc/module_revisions.html b/telemeta/templates/telemeta/inc/module_revisions.html index a8d503ad..40f8d259 100644 --- a/telemeta/templates/telemeta/inc/module_revisions.html +++ b/telemeta/templates/telemeta/inc/module_revisions.html @@ -4,10 +4,10 @@
    {% block rss_title %} - + rss

    {% trans title %}

    -    +    {% endblock rss_title %}
    @@ -24,24 +24,24 @@ {% if r.element %} {% if r.revision.element_type == "corpus" or r.revision.element_type == "fonds"%} - {{ r.element.title }} + {{ r.element.title }} {% endif %} {% if r.revision.element_type == "collection" %} - {{ r.element.title }} + {{ r.element.title }} {% endif %} {% if r.revision.element_type == "item" %} - + {% if r.element.title != '' %}{{ r.element.title }}{% else %}{{ r.element.collection.title }} - {{ r.element.track }}{% endif %} {% endif %} {% if r.revision.element_type == "marker" %} - {{ r.element.title }} + {{ r.element.title }} {% endif %} {% else %} {% trans "deleted" %} {% endif %} {{ r.revision.element_type }} - {% if r.revision.user %}{{ r.revision.user.username }}{% endif %} + {% if r.revision.user %}{{ r.revision.user.username }}{% endif %} {% endfor %} diff --git a/telemeta/templates/telemeta/inc/module_searches.html b/telemeta/templates/telemeta/inc/module_searches.html index d6c4f17d..21726789 100644 --- a/telemeta/templates/telemeta/inc/module_searches.html +++ b/telemeta/templates/telemeta/inc/module_searches.html @@ -15,7 +15,7 @@ {% for s in searches %} {{ s.date }} - + {% for c in s.criteria.all %}
  • {% trans c.key %} : {{ c.value}}
  • {% endfor %} diff --git a/telemeta/templates/telemeta/inc/module_user_revisions.html b/telemeta/templates/telemeta/inc/module_user_revisions.html index e066fcc8..4acaacd5 100644 --- a/telemeta/templates/telemeta/inc/module_user_revisions.html +++ b/telemeta/templates/telemeta/inc/module_user_revisions.html @@ -3,9 +3,9 @@ {% load i18n %} {% block rss_title %} -
    + rss

    {% trans title %}

    -   +   {% endblock rss_title %} diff --git a/telemeta/templates/telemeta/inc/resource_list.html b/telemeta/templates/telemeta/inc/resource_list.html index a5226c3d..6506f956 100644 --- a/telemeta/templates/telemeta/inc/resource_list.html +++ b/telemeta/templates/telemeta/inc/resource_list.html @@ -18,7 +18,7 @@ {% for resource in resources %} - {{ resource.title }} + {{ resource.title }} {{ resource.descriptions }} {{ resource.code }} diff --git a/telemeta/templates/telemeta/inc/resource_related.html b/telemeta/templates/telemeta/inc/resource_related.html index 13546051..4905aedc 100644 --- a/telemeta/templates/telemeta/inc/resource_related.html +++ b/telemeta/templates/telemeta/inc/resource_related.html @@ -28,7 +28,7 @@ {{ media.url|get_filename }} {% endif %} {% else %} - + {% if media.title %} {{ media.title }} {% else %} @@ -44,7 +44,7 @@ {% if media.file %}
    {% trans "Download" %}
    - + {{ media.file|get_filename }}
    @@ -56,7 +56,7 @@ {% if media.is_image %} {% if media.file %} - + {% thumbnail media.file "x200" as im %} {% endthumbnail %} diff --git a/telemeta/templates/telemeta/inc/user_list.html b/telemeta/templates/telemeta/inc/user_list.html index a82240a9..8874bc07 100644 --- a/telemeta/templates/telemeta/inc/user_list.html +++ b/telemeta/templates/telemeta/inc/user_list.html @@ -12,7 +12,7 @@ {% for user in users %} - {{user.username}} + {{user.username}} {{ user.first_name }} {{ user.last_name }} {{ user.email }} diff --git a/telemeta/templates/telemeta/instrument_alias_edit.html b/telemeta/templates/telemeta/instrument_alias_edit.html index 163b2999..cb3b35a2 100644 --- a/telemeta/templates/telemeta/instrument_alias_edit.html +++ b/telemeta/templates/telemeta/instrument_alias_edit.html @@ -9,7 +9,7 @@ {% block tabcontents %}
    {% csrf_token %} + action="{% url "telemeta-instrument-alias-add" %}">{% csrf_token %}
    {% trans "Add entry" %}
    @@ -24,7 +24,7 @@
    {% if instruments %} -
    {% csrf_token %} + {% csrf_token %} @@ -32,7 +32,7 @@ {% for record in instruments %} - {% endfor %} diff --git a/telemeta/templates/telemeta/instrument_alias_edit_value.html b/telemeta/templates/telemeta/instrument_alias_edit_value.html index 5a7d485c..17a5e0ed 100644 --- a/telemeta/templates/telemeta/instrument_alias_edit_value.html +++ b/telemeta/templates/telemeta/instrument_alias_edit_value.html @@ -4,7 +4,7 @@ {% block extra_javascript %} {% endblock extra_javascript %} @@ -23,7 +23,7 @@ $(document).ready(function(){

    {% trans "Instruments" %}

    {% csrf_token %} + action="{% url "telemeta-instrument-alias-record-update" instrument.id %}">{% csrf_token %}
    {% trans "Modify an entry" %}
    @@ -34,14 +34,14 @@ $(document).ready(function(){
    {% csrf_token %} + action="{% url "telemeta-instrument-alias-record-replace" instrument.id %}">{% csrf_token %}
    {% trans "Replace by" %}
    @@ -56,7 +56,7 @@ $(document).ready(function(){
    diff --git a/telemeta/templates/telemeta/instrument_edit.html b/telemeta/templates/telemeta/instrument_edit.html index 46ceb864..c6024045 100644 --- a/telemeta/templates/telemeta/instrument_edit.html +++ b/telemeta/templates/telemeta/instrument_edit.html @@ -9,7 +9,7 @@ {% block tabcontents %} {% csrf_token %} + action="{% url "telemeta-instrument-add" %}">{% csrf_token %}
    {% trans "Add entry" %}
    @@ -24,7 +24,7 @@
    {% if instruments %} - {% csrf_token %} + {% csrf_token %}
     {% trans "Name"%}
    + {{record.name}}
    @@ -32,7 +32,7 @@ {% for record in instruments %} - {% endfor %} diff --git a/telemeta/templates/telemeta/instrument_edit_value.html b/telemeta/templates/telemeta/instrument_edit_value.html index 8c2de01b..d85d0238 100644 --- a/telemeta/templates/telemeta/instrument_edit_value.html +++ b/telemeta/templates/telemeta/instrument_edit_value.html @@ -4,7 +4,7 @@ {% block extra_javascript %} {% endblock extra_javascript %} @@ -23,7 +23,7 @@ $(document).ready(function(){

    {% trans "Instruments" %}

    {% csrf_token %} + action="{% url "telemeta-instrument-record-update" instrument.id %}">{% csrf_token %}
    {% trans "Modify an entry" %}
    @@ -34,14 +34,14 @@ $(document).ready(function(){
    {% csrf_token %} + action="{% url "telemeta-instrument-record-replace" instrument.id %}">{% csrf_token %}
    {% trans "Replace by" %}
    @@ -56,7 +56,7 @@ $(document).ready(function(){
    diff --git a/telemeta/templates/telemeta/lists.html b/telemeta/templates/telemeta/lists.html index 6bf5b053..a8716ab0 100644 --- a/telemeta/templates/telemeta/lists.html +++ b/telemeta/templates/telemeta/lists.html @@ -53,8 +53,8 @@ @@ -78,16 +78,16 @@ diff --git a/telemeta/templates/telemeta/login.html b/telemeta/templates/telemeta/login.html index c5819b39..28aa0a53 100644 --- a/telemeta/templates/telemeta/login.html +++ b/telemeta/templates/telemeta/login.html @@ -18,7 +18,7 @@ $(document).ready(function() { {% if form.errors %} {% endif %} -{% csrf_token %} +{% csrf_token %}

    {{ form.username.label_tag }} {{ form.username }}
    @@ -27,6 +27,6 @@ $(document).ready(function() {

    -{% trans "Password forgotten" %} ? +{% trans "Password forgotten" %} ? {% endblock %} diff --git a/telemeta/templates/telemeta/mediaitem_add.html b/telemeta/templates/telemeta/mediaitem_add.html index 3a252d3a..faa28035 100644 --- a/telemeta/templates/telemeta/mediaitem_add.html +++ b/telemeta/templates/telemeta/mediaitem_add.html @@ -10,7 +10,7 @@ {% endblock %} {% block title_buttons %} - {% trans "Cancel" %} {% if perms.telemeta.add_mediaitem %} {% trans "Save" %} @@ -46,7 +46,7 @@ {% endfor %}
     {% trans "Name"%}
    + {{record.name}}
    {{ playlist.playlist.title }} {% trans "Edit" %} - CSV Collections - CSV Items + CSV Collections + CSV Items {% trans "Delete" %}
    {% if resource.type == "item" and not resource.element == None %} - {{ resource.element }} + {{ resource.element }} {% endif %} {% if resource.type == "collection" and not resource.element == None %} - {% if resource.element.title %}{{ resource.element.title }}{% else %}{{ resource.element }}{% endif %} + {% if resource.element.title %}{{ resource.element.title }}{% else %}{{ resource.element }}{% endif %} {% endif %} {% if resource.type == "marker" and not resource.element == None %} - {{ resource.element }} + {{ resource.element }} {% endif %} {% if resource.type == "corpus" or resource.type == "fonds" %} - {{ resource.element.title }} + {{ resource.element.title }} {% endif %} {% if resource.element == None %}{% trans "deleted" %}{% endif %}
    - {% trans "Cancel" %} {% if perms.telemeta.add_mediaitem %} - {% trans "Cancel" %} + {% trans "Cancel" %} {% if perms.telemeta.add_mediaitem %} {% trans "Save" %} {% endif %} @@ -55,7 +55,7 @@ {% endfor %} diff --git a/telemeta/templates/telemeta/mediaitem_detail.html b/telemeta/templates/telemeta/mediaitem_detail.html index 1affc7be..69fd31a8 100644 --- a/telemeta/templates/telemeta/mediaitem_detail.html +++ b/telemeta/templates/telemeta/mediaitem_detail.html @@ -40,18 +40,18 @@ {% block graphers %} var visualizers = {}; {% for v in visualizers %} - visualizers["{{v.name}}"] = "{% url telemeta-item-visualize item.public_id,v.id,"WIDTH","HEIGHT" %}"; + visualizers["{{v.name}}"] = "{% url 'telemeta-item-visualize' item.public_id v.id 'WIDTH' 'HEIGHT' %}"; {% endfor %} {% endblock graphers %} {% if user.is_superuser %} - loadPlayer('{% url telemeta-item-analyze-xml item.public_id %}', - "{% url telemeta-item-export item.public_id,"mp3" %}", undefined, '{{item.id}}', visualizers, + loadPlayer('{% url "telemeta-item-analyze-xml" item.public_id %}', + "{% url "telemeta-item-export" item.public_id 'mp3' %}", undefined, '{{item.id}}', visualizers, CURRENT_USER_NAME, //undefined if !user.is_authenticated true); //true because superuser {% else %} - loadPlayer('{% url telemeta-item-analyze-xml item.public_id %}', - "{% url telemeta-item-export item.public_id,"mp3" %}", undefined, '{{item.id}}', visualizers, + loadPlayer('{% url "telemeta-item-analyze-xml" item.public_id %}', + "{% url "telemeta-item-export" item.public_id 'mp3' %}", undefined, '{{item.id}}', visualizers, CURRENT_USER_NAME, //undefined if !user.is_authenticated false); //false because not superuser {% endif %} @@ -86,20 +86,20 @@ {% block title %} item -Item : {{ item }} +Item : {{ item }} {% endblock %} {% block title_buttons %}
    {% if user.is_authenticated and perms.telemeta.change_mediaitem %} - {% trans "Edit" %} - {% trans "Copy" %} + {% trans "Edit" %} + {% trans "Copy" %} {% endif %} {% if user.is_authenticated %} {% trans "Add to playlist" %} {% endif %} - {% trans "Previous" %} - {% trans "Next" %} + {% trans "Previous" %} + {% trans "Next" %}
    {% endblock %} @@ -129,7 +129,7 @@ Item : {{ item }}
    @@ -171,7 +171,7 @@ Item : {{ item }}

    download {% trans "Download:" %} {% for format in export_formats %} - + {{ format.extension }} {% endfor %}

    @@ -182,7 +182,7 @@ Item : {{ item }}
    - {% trans "You don't have access to the media of this item." %} {% trans "Please contact the administrators to get more rights." %} {% trans "Click here" %} + {% trans "You don't have access to the media of this item." %} {% trans "Please contact the administrators to get more rights." %} {% trans "Click here" %}
    @@ -197,14 +197,14 @@ Item : {{ item }} {% dl_field item "alt_title" %} {% dl_field item "collector" placeholder %}
    {% field_label item "collection" %}
    -
    {{ item.collection }}
    +
    {{ item.collection }}
    {% trans "Recording date" %}
    {% if item.recorded_from_date %}{{ item.recorded_from_date }}{% endif %}{% if item.recorded_from_date and item.recorded_to_date%} - {% endif %}{% if item.recorded_to_date %}{{ item.recorded_to_date}}{% endif %}
    {% if last_revision %}
    {% trans "Last modification" %}
    -
    {{ last_revision.time }} {% if user.is_authenticated %}({{last_revision.user.username}}){% endif %}
    +
    {{ last_revision.time }} {% if user.is_authenticated %}({{last_revision.user.username}}){% endif %}
    {% endif %} @@ -342,9 +342,9 @@ Item : {{ item }} {% endblock %} {% block delete %} -Dublin Core +Dublin Core {% if user.is_authenticated and perms.telemeta.delete_mediaitem %} - {% trans "Delete" %} {% endif %} {% endblock %} diff --git a/telemeta/templates/telemeta/mediaitem_detail_dc.html b/telemeta/templates/telemeta/mediaitem_detail_dc.html index 95f07b8c..896dd6db 100644 --- a/telemeta/templates/telemeta/mediaitem_detail_dc.html +++ b/telemeta/templates/telemeta/mediaitem_detail_dc.html @@ -14,9 +14,9 @@ {% endif %} {% block delete %} -{% trans "Normal View" %} +{% trans "Normal View" %} {% if user.is_authenticated and perms.telemeta.delete_mediaitem %} - {% trans "Delete" %} {% endif %} {% endblock %} diff --git a/telemeta/templates/telemeta/mediaitem_edit.html b/telemeta/templates/telemeta/mediaitem_edit.html index 00c59f72..a40fffdf 100644 --- a/telemeta/templates/telemeta/mediaitem_edit.html +++ b/telemeta/templates/telemeta/mediaitem_edit.html @@ -8,7 +8,7 @@ {% block title_buttons %}
    - {% trans "Cancel" %} + {% trans "Cancel" %} {% if perms.telemeta.change_mediaitem %} {% trans "Save" %} {% endif %} @@ -51,16 +51,16 @@ {% if form.prefix == "item" and forloop.last %} {% trans "Keywords" %}: - {% trans "Edit" %} {% trans "keywords" %} + {% trans "Edit" %} {% trans "keywords" %} {% trans "Performance" %}: - {% trans "Edit"%} {% trans "performance"%} + {% trans "Edit"%} {% trans "performance"%} {% trans "Related media" %}: - {% trans "Edit"%} {% trans "related media"%} + {% trans "Edit"%} {% trans "related media"%} {% endif %} {% endfor %} @@ -68,7 +68,7 @@
    - {% trans "Cancel" %} + {% trans "Cancel" %} {% if perms.telemeta.change_mediaitem %} {% trans "Save" %} {% endif %} diff --git a/telemeta/templates/telemeta/mediaitem_keywords_edit.html b/telemeta/templates/telemeta/mediaitem_keywords_edit.html index b3ee6bce..31aceadf 100644 --- a/telemeta/templates/telemeta/mediaitem_keywords_edit.html +++ b/telemeta/templates/telemeta/mediaitem_keywords_edit.html @@ -9,7 +9,7 @@ item

    Item : {{ item }}

    {% endblock %} {% block title_buttons %} - {% trans "Cancel" %} + {% trans "Cancel" %} {% trans "Save" %} {% endblock %} @@ -36,7 +36,7 @@ {% endfor %} diff --git a/telemeta/templates/telemeta/mediaitem_list.html b/telemeta/templates/telemeta/mediaitem_list.html index d0da3526..6abe3237 100644 --- a/telemeta/templates/telemeta/mediaitem_list.html +++ b/telemeta/templates/telemeta/mediaitem_list.html @@ -9,12 +9,12 @@ {% endblock %} {% block title_buttons %} - {% trans "All" %} - {% trans "Unpublished" %} - {% trans "Published" %} - {% trans "Sounds" %} + {% trans "All" %} + {% trans "Unpublished" %} + {% trans "Published" %} + {% trans "Sounds" %} {% if user.is_authenticated and perms.telemeta.add_mediaitem %} - {% trans "Add" %} + {% trans "Add" %} {% endif %} {% endblock %} diff --git a/telemeta/templates/telemeta/mediaitem_performances_edit.html b/telemeta/templates/telemeta/mediaitem_performances_edit.html index ab0d0227..45cfeb4c 100644 --- a/telemeta/templates/telemeta/mediaitem_performances_edit.html +++ b/telemeta/templates/telemeta/mediaitem_performances_edit.html @@ -9,7 +9,7 @@ {% endblock %} {% block title_buttons %} - {% trans "Cancel" %} + {% trans "Cancel" %} {% trans "Save" %} {% endblock %} @@ -40,7 +40,7 @@
    {% endfor %} diff --git a/telemeta/templates/telemeta/mediaitem_player.html b/telemeta/templates/telemeta/mediaitem_player.html index 01bfab08..e75944b0 100644 --- a/telemeta/templates/telemeta/mediaitem_player.html +++ b/telemeta/templates/telemeta/mediaitem_player.html @@ -30,7 +30,7 @@
    diff --git a/telemeta/templates/telemeta/mediaitem_player_contour.html b/telemeta/templates/telemeta/mediaitem_player_contour.html index 5d6f1045..fedc8855 100644 --- a/telemeta/templates/telemeta/mediaitem_player_contour.html +++ b/telemeta/templates/telemeta/mediaitem_player_contour.html @@ -25,7 +25,7 @@ {% block graphers %} //initializing the visualizers to be passed to the player var visualizers = {}; - visualizers["{{visualizer_id}}"] = "{% url telemeta-item-visualize item.public_id,visualizer_id,"WIDTH","HEIGHT" %}"; + visualizers["{{visualizer_id}}"] = "{% url "telemeta-item-visualize" item.public_id,visualizer_id,"WIDTH","HEIGHT" %}"; {% endblock graphers %} {% block title %}{% endblock %} diff --git a/telemeta/templates/telemeta/mediaitem_related_edit.html b/telemeta/templates/telemeta/mediaitem_related_edit.html index 8714b215..619a6177 100644 --- a/telemeta/templates/telemeta/mediaitem_related_edit.html +++ b/telemeta/templates/telemeta/mediaitem_related_edit.html @@ -9,7 +9,7 @@ {% endblock %} {% block title_buttons %} - {% trans "Cancel" %} + {% trans "Cancel" %} {% trans "Save" %} {% endblock %} @@ -36,7 +36,7 @@
    {% endfor %} diff --git a/telemeta/templates/telemeta/mediaitem_xspf.xml b/telemeta/templates/telemeta/mediaitem_xspf.xml index f899cbec..6d9da33e 100644 --- a/telemeta/templates/telemeta/mediaitem_xspf.xml +++ b/telemeta/templates/telemeta/mediaitem_xspf.xml @@ -5,9 +5,9 @@ {{ item }} mp3 - http://{{ host }}{% url telemeta-item-export item.public_id,"mp3" %} + http://{{ host }}{% url "telemeta-item-export" item.public_id,"mp3" %} {{ item.get_duration|mul:1000 }} - http://{{ host }}{% url telemeta-item-detail item.public_id %} + http://{{ host }}{% url "telemeta-item-detail" item.public_id %} {% endblock %} diff --git a/telemeta/templates/telemeta/profile_detail.html b/telemeta/templates/telemeta/profile_detail.html index 48dab507..16218314 100644 --- a/telemeta/templates/telemeta/profile_detail.html +++ b/telemeta/templates/telemeta/profile_detail.html @@ -69,10 +69,10 @@
    {% if user.is_authenticated and user.username == usr.username or user.is_staff %} - {% trans "Edit" %} + {% trans "Edit" %} {% endif %} {% if user.is_authenticated and user.username == usr.username %} - + {% endif %}
    diff --git a/telemeta/templates/telemeta/profile_edit.html b/telemeta/templates/telemeta/profile_edit.html index d0e6f96f..afaa1f8c 100644 --- a/telemeta/templates/telemeta/profile_edit.html +++ b/telemeta/templates/telemeta/profile_edit.html @@ -3,7 +3,7 @@ {% load telemeta_utils %} {% block title_buttons %} - {% trans "Cancel" %} + {% trans "Cancel" %} {% endblock %} {% block content %} @@ -26,7 +26,7 @@ {% endfor %}
    - {% trans "Cancel" %} + {% trans "Cancel" %} {% trans "Save" %}
    diff --git a/telemeta/templates/telemeta/registration/password_change_done.html b/telemeta/templates/telemeta/registration/password_change_done.html index 075a6855..fa371374 100644 --- a/telemeta/templates/telemeta/registration/password_change_done.html +++ b/telemeta/templates/telemeta/registration/password_change_done.html @@ -1,6 +1,6 @@ {% extends "telemeta/base.html" %} {% load i18n %} -{% block userlinks %}{% url django-admindocs-docroot as docsroot %}{% if docsroot %}{% trans 'Documentation' %} / {% endif %}{% trans 'Change password' %} / {% trans 'Log out' %}{% endblock %} +{% block userlinks %}{% url "django-admindocs-docroot" as docsroot %}{% if docsroot %}{% trans 'Documentation' %} / {% endif %}{% trans 'Change password' %} / {% trans 'Log out' %}{% endblock %} {% block title %}
    {% trans 'Password change successful' %}{% endblock %} diff --git a/telemeta/templates/telemeta/registration/password_change_form.html b/telemeta/templates/telemeta/registration/password_change_form.html index 79274dbb..dd9b9259 100644 --- a/telemeta/templates/telemeta/registration/password_change_form.html +++ b/telemeta/templates/telemeta/registration/password_change_form.html @@ -1,7 +1,7 @@ {% extends "telemeta/base.html" %} {% load i18n adminmedia %} {% block extrastyle %}{{ block.super }}{% endblock %} -{% block userlinks %}{% url django-admindocs-docroot as docsroot %}{% if docsroot %}{% trans 'Documentation' %} / {% endif %} {% trans 'Change password' %} / {% trans 'Log out' %}{% endblock %} +{% block userlinks %}{% url "django-admindocs-docroot" as docsroot %}{% if docsroot %}{% trans 'Documentation' %} / {% endif %} {% trans 'Change password' %} / {% trans 'Log out' %}{% endblock %} {% block title %}
    {% trans 'Password change' %}{% endblock %} diff --git a/telemeta/templates/telemeta/registration/password_reset_email.html b/telemeta/templates/telemeta/registration/password_reset_email.html index f97d2768..e7fbaceb 100644 --- a/telemeta/templates/telemeta/registration/password_reset_email.html +++ b/telemeta/templates/telemeta/registration/password_reset_email.html @@ -5,7 +5,7 @@ {% trans "Please go to the following page and choose a new password:" %} {% block reset_link %} -{{ protocol }}://{{ domain }}{% url telemeta-password-reset-confirm uidb36=uid token=token %} +{{ protocol }}://{{ domain }}{% url "telemeta-password-reset-confirm" uidb36=uid token=token %} {% endblock %} {% trans "Your username, in case you've forgotten:" %} {{ user.username }} diff --git a/telemeta/templates/telemeta/resource_detail.html b/telemeta/templates/telemeta/resource_detail.html index b411caac..3ffb30d1 100644 --- a/telemeta/templates/telemeta/resource_detail.html +++ b/telemeta/templates/telemeta/resource_detail.html @@ -34,16 +34,16 @@ jQuery(document).ready(function(){ {% block title %} {{ type|capitalize }} : - {{ resource.title }} + {{ resource.title }} {% endblock %} {% block title_buttons %}
    {% if perms.telemeta.change_mediacorpus or perms.telemeta.change_mediafonds %} - {% trans "Edit" %} + {% trans "Edit" %} {% endif %} {% if perms.telemeta.add_mediacorpus or perms.telemeta.add_mediafonds %} - {% trans "Copy" %} + {% trans "Copy" %} {% endif %} {% if user.is_authenticated %} {% trans "Add to playlist" %} @@ -68,11 +68,11 @@ jQuery(document).ready(function(){ {% endfor %} {% for parent in parents %}
    {% trans parent.element_type|capitalize %}
    -
    {{ parent.title }}
    +
    {{ parent.title }}
    {% endfor %} {% if last_revision %}
    {% trans "Last modification" %}
    -
    {{ last_revision.time }} {% if user.is_authenticated %}({{last_revision.user.username}}){% endif %}
    +
    {{ last_revision.time }} {% if user.is_authenticated %}({{last_revision.user.username}}){% endif %}
    {% endif %} @@ -98,9 +98,9 @@ jQuery(document).ready(function(){ {% endblock %} {% block delete %} -Dublin Core +Dublin Core {% if user.is_authenticated and perms.telemeta.delete_mediaresource %} - {% trans "Delete" %} {% endif %} {% endblock %} diff --git a/telemeta/templates/telemeta/resource_detail_dc.html b/telemeta/templates/telemeta/resource_detail_dc.html index ec5c0754..98e31a59 100644 --- a/telemeta/templates/telemeta/resource_detail_dc.html +++ b/telemeta/templates/telemeta/resource_detail_dc.html @@ -11,9 +11,9 @@ {% endblock %} {% block delete %} - {% trans "Normal View" %} + {% trans "Normal View" %} {% if user.is_authenticated and perms.telemeta.delete_mediaresource %} - {% trans "Delete" %} {% endif %} {% endblock %} diff --git a/telemeta/templates/telemeta/resource_edit.html b/telemeta/templates/telemeta/resource_edit.html index fab6631e..d3499e8c 100644 --- a/telemeta/templates/telemeta/resource_edit.html +++ b/telemeta/templates/telemeta/resource_edit.html @@ -6,7 +6,7 @@ {{ type }} : {{ resource }} {% endblock %} {% block title_buttons %} - {% trans "Cancel" %} + {% trans "Cancel" %} {% if perms.telemeta.add_mediacorpus or perms.telemeta.add_mediafonds %} {% trans "Save" %} {% endif %} @@ -29,11 +29,11 @@ {% endfor %} {% trans "Related media" %}: - {% trans "Edit"%} {% trans "related media"%} + {% trans "Edit"%} {% trans "related media"%}
    - {% trans "Cancel" %} + {% trans "Cancel" %} {% if perms.telemeta.add_mediacorpus or perms.telemeta.add_mediafonds %} {% trans "Save" %} {% endif %} diff --git a/telemeta/templates/telemeta/resource_list.html b/telemeta/templates/telemeta/resource_list.html index 3f3f2a2a..feda1ae1 100644 --- a/telemeta/templates/telemeta/resource_list.html +++ b/telemeta/templates/telemeta/resource_list.html @@ -10,7 +10,7 @@ {% block title_buttons %} {% if perms.telemeta.add_mediacorpus or perms.telemeta.add_mediafonds %} - {% trans "Add" %} + {% trans "Add" %} {% endif %} {% endblock %} diff --git a/telemeta/templates/telemeta/resource_related_edit.html b/telemeta/templates/telemeta/resource_related_edit.html index 8e41764a..d787dcec 100644 --- a/telemeta/templates/telemeta/resource_related_edit.html +++ b/telemeta/templates/telemeta/resource_related_edit.html @@ -9,7 +9,7 @@ {% endblock %} {% block title_buttons %} - {% trans "Cancel" %} + {% trans "Cancel" %} {% trans "Save" %} {% endblock %} @@ -36,7 +36,7 @@
    {% endfor %} diff --git a/telemeta/templates/telemeta/search_criteria.html b/telemeta/templates/telemeta/search_criteria.html index 41fbe26a..3477c004 100644 --- a/telemeta/templates/telemeta/search_criteria.html +++ b/telemeta/templates/telemeta/search_criteria.html @@ -32,7 +32,7 @@ function update_period(source, from_field, to_field) { } $(document).ready(function () { - $('#location').autocomplete('{% url telemeta-complete-location %}', { + $('#location').autocomplete('{% url "telemeta-complete-location" %}', { max: 20, formatResult: function(data) { return data[0].replace(/ *\([0-9]+.*\) *$/, ''); @@ -64,7 +64,7 @@ $(document).ready(function() { {% endblock %} {% block content %} -
    {% csrf_token %} +{% csrf_token %}

    diff --git a/telemeta/templates/telemeta/search_results.html b/telemeta/templates/telemeta/search_results.html index 0d6ce317..e2e662ef 100644 --- a/telemeta/templates/telemeta/search_results.html +++ b/telemeta/templates/telemeta/search_results.html @@ -10,12 +10,12 @@ {% block title_buttons %} {% ifequal type 'items' %} - {% trans "All" %} - {% trans "Sounds" %} + {% trans "All" %} + {% trans "Sounds" %} {% endifequal %} {% ifequal type 'collections' %} - {% trans "All" %} - {% trans "Sounds" %} + {% trans "All" %} + {% trans "Sounds" %} {% endifequal %} {% endblock %} @@ -64,7 +64,7 @@ {% endif %} {% ifequal type 'items' %} -

    Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}})

    +

    Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}})

    {% with object_list as items %}
    {% include "telemeta/inc/mediaitem_list.html" %} @@ -73,7 +73,7 @@ {% endifequal %} {% ifequal type 'collections' %} -

    Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}}) +

    Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}})

    {% with object_list as collections %}
    @@ -83,12 +83,12 @@ {% endifequal %} {% if type == 'corpus' %} -

    Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}}) +

    Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}})

    {% endif %} {% if type == 'fonds' %} -

    Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}}) +

    Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}})

    {% endif %} diff --git a/telemeta/urls.py b/telemeta/urls.py index deb519b2..a38d0f9b 100644 --- a/telemeta/urls.py +++ b/telemeta/urls.py @@ -34,9 +34,10 @@ # Authors: Olivier Guilyardi # Guillaume Pellerin -from django.conf.urls.defaults import * +from django.conf.urls import patterns, url, include from django.conf import settings -from django.views.generic.simple import redirect_to +from django.views.generic import RedirectView +from django.views.generic.list import ListView from telemeta.models import MediaItem, MediaCollection, MediaItemMarker, MediaCorpus, MediaFonds from telemeta.views import HomeView, AdminView, CollectionView, ItemView, \ InstrumentView, InstrumentAliasView, PlaylistView, ProfileView, GeoView, \ @@ -78,10 +79,10 @@ urlpatterns = patterns('', url(r'^$', home_view.home, name="telemeta-home"), # items - url(r'^archives/items/$', 'django.views.generic.list_detail.object_list', - dict(all_items, paginate_by=20, template_name="telemeta/mediaitem_list.html"), + url(r'^archives/items/$', ListView.as_view(queryset=MediaItem.objects.enriched().order_by('code', 'old_code')), + dict(paginate_by=20, template_name="telemeta/mediaitem_list.html"), name="telemeta-items"), - url(r'^archives/items_sound/$', 'django.views.generic.list_detail.object_list', + url(r'^archives/items_sound/$', ListView.as_view(), dict(all_items_sound, paginate_by=20, template_name="telemeta/mediaitem_list.html"), name="telemeta-items-sound"), url(r'^archives/items/(?P[A-Za-z0-9._-]+)/$', item_view.item_detail, name="telemeta-item-detail"), @@ -128,21 +129,20 @@ urlpatterns = patterns('', # Markers url(r'^archives/markers/(?P[A-Za-z0-9]+)/$', item_view.item_detail, name="telemeta-item-detail-marker"), # FIXME: need all paths - url(r'^items/(?P[A-Za-z0-9._-s/]+)/$', redirect_to, {'url': '/archives/items/%(path)s/', 'permanent': False}, name="telemeta-item-redir"), - url(r'^archives/items_unpublished/$', 'django.views.generic.list_detail.object_list', + url(r'^items/(?P[A-Za-z0-9._-s/]+)/$', RedirectView.as_view(), {'url': '/archives/items/%(path)s/', 'permanent': False}, name="telemeta-item-redir"), + url(r'^archives/items_unpublished/$', ListView.as_view(), dict(all_items_unpublished, paginate_by=20, template_name="telemeta/mediaitem_list.html"), name="telemeta-items-unpublished"), - url(r'^archives/items_published/$', 'django.views.generic.list_detail.object_list', + url(r'^archives/items_published/$', ListView.as_view(), dict(all_items_published, paginate_by=20, template_name="telemeta/mediaitem_list.html"), name="telemeta-items-published"), # collections - url(r'^archives/collections/$', 'django.views.generic.list_detail.object_list', + url(r'^archives/collections/$', ListView.as_view(), dict(all_collections, paginate_by=20, template_name="telemeta/collection_list.html"), name="telemeta-collections"), - url(r'^archives/collections_unpublished/$', 'django.views.generic.list_detail.object_list', + url(r'^archives/collections_unpublished/$', ListView.as_view(), dict(all_collections_unpublished, paginate_by=20, template_name="telemeta/collection_list.html"), name="telemeta-collections-unpublished"), - url(r'^archives/collections_published/$', 'django.views.generic.list_detail.object_list', + url(r'^archives/collections_published/$', ListView.as_view(), dict(all_collections_published, paginate_by=20, template_name="telemeta/collection_list.html"), name="telemeta-collections-published"), - url(r'^archives/collections/?page=(?P[0-9]+)$', - 'django.views.generic.list_detail.object_list', + url(r'^archives/collections/?page=(?P[0-9]+)$', ListView.as_view(), dict(all_collections, paginate_by=20)), url(r'^archives/collections/(?P[A-Za-z0-9._-]+)/$', collection_view.collection_detail, dict(template="telemeta/collection_detail.html"), name="telemeta-collection-detail"), @@ -169,19 +169,19 @@ urlpatterns = patterns('', url(r'^archives/collections/(?P[A-Za-z0-9._-]+)/related/(?P[A-Za-z0-9._-]+)/download/$', collection_view.related_media_collection_download, name="telemeta-collection-related-download"), url(r'^archives/collections/(?P[A-Za-z0-9._-]+)/related_edit/$', collection_view.related_media_edit, dict(template='telemeta/collection_related_edit.html'), name="telemeta-collection-related_edit"), - url(r'^archives/collections_sound/$', 'django.views.generic.list_detail.object_list', + url(r'^archives/collections_sound/$', ListView.as_view(), dict(all_collections_sound, paginate_by=20, template_name="telemeta/collection_list.html"), name="telemeta-collections-sound"), # FIXME: need all paths - url(r'^collections/(?P[A-Za-z0-9._-s/]+)/$', redirect_to, {'url': '/archives/collections/%(path)s/', 'permanent': False}, name="telemeta-collection-redir"), + url(r'^collections/(?P[A-Za-z0-9._-s/]+)/$', RedirectView.as_view(), {'url': '/archives/collections/%(path)s/', 'permanent': False}, name="telemeta-collection-redir"), url(r'^archives/collections/(?P[A-Za-z0-9._-]+)/package/$', CollectionPackageView.as_view(), name="telemeta-collection-package"), # RESOURCES # Corpus list - url(r'^archives/corpus/$', 'django.views.generic.list_detail.object_list', + url(r'^archives/corpus/$', ListView.as_view(), dict(all_corpus, paginate_by=20, template_name="telemeta/resource_list.html", extra_context={'type':'corpus'}), name="telemeta-corpus"), # Fonds list - url(r'^archives/fonds/$', 'django.views.generic.list_detail.object_list', + url(r'^archives/fonds/$', ListView.as_view(), dict(all_fonds, paginate_by=20, template_name="telemeta/resource_list.html", extra_context={'type':'fonds'}), name="telemeta-fonds"), # Generic resource @@ -351,7 +351,7 @@ urlpatterns = patterns('', # JSON RPC url(r'json/$', jsonrpc_site.dispatch, name='jsonrpc_mountpoint'), # for the graphical browser/web console only, omissible - # url(r'json/browse/', 'jsonrpc.views.browse', name="jsonrpc_browser"), + #url(r'json/browse/', 'jsonrpc.views.browse', name="jsonrpc_browser"), # Playlists url(r'^playlists/(?P[a-zA-Z0-9]+)/(?P[a-zA-Z0-9]+)/csv/$', playlist_view.playlist_csv_export, name="telemeta-playlist-csv-export"), diff --git a/telemeta/views/core.py b/telemeta/views/core.py index 21d637b5..c86cf177 100644 --- a/telemeta/views/core.py +++ b/telemeta/views/core.py @@ -55,7 +55,6 @@ from django import template from django.http import HttpResponse, HttpResponseRedirect from django.http import Http404 from django.shortcuts import render_to_response, redirect, get_object_or_404 -from django.views.generic import list_detail from django.views.generic import * from django.conf import settings from django.contrib import auth @@ -263,4 +262,4 @@ def get_room(content_type=None, id=None, name=None): else: room = rooms[0] return room - + -- 2.39.5