--- a/src/hashcut/migrations/0001_create_hashcut_tables.py Mon May 06 16:12:54 2013 +0200
+++ b/src/hashcut/migrations/0001_create_hashcut_tables.py Fri May 24 23:28:50 2013 +0200
@@ -1,35 +1,33 @@
# -*- coding: utf-8 -*-
-import datetime
from south.db import db
from south.v2 import SchemaMigration
-from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Branding'
- db.create_table('hashcut_branding', (
+ db.create_table('hashcut_branding', ( # @UndefinedVariable
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(max_length=255, unique=True, null=True, blank=True)),
))
- db.send_create_signal('hashcut', ['Branding'])
+ db.send_create_signal('hashcut', ['Branding']) # @UndefinedVariable
# Adding model 'Mashup'
- db.create_table('hashcut_mashup', (
+ db.create_table('hashcut_mashup', ( # @UndefinedVariable
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('project', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ldt_utils.Project'], null=True)),
('branding', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['hashcut.Branding'])),
))
- db.send_create_signal('hashcut', ['Mashup'])
+ db.send_create_signal('hashcut', ['Mashup']) # @UndefinedVariable
def backwards(self, orm):
# Deleting model 'Branding'
- db.delete_table('hashcut_branding')
+ db.delete_table('hashcut_branding') # @UndefinedVariable
# Deleting model 'Mashup'
- db.delete_table('hashcut_mashup')
+ db.delete_table('hashcut_mashup') # @UndefinedVariable
models = {
--- a/src/hashcut/migrations/0002_branding_iri_bpi.py Mon May 06 16:12:54 2013 +0200
+++ b/src/hashcut/migrations/0002_branding_iri_bpi.py Fri May 24 23:28:50 2013 +0200
@@ -1,8 +1,5 @@
# -*- coding: utf-8 -*-
-import datetime
-from south.db import db
from south.v2 import DataMigration
-from django.db import models
class Migration(DataMigration):
--- a/src/hashcut/migrations/0003_add_group_to_branding.py Mon May 06 16:12:54 2013 +0200
+++ b/src/hashcut/migrations/0003_add_group_to_branding.py Fri May 24 23:28:50 2013 +0200
@@ -1,22 +1,20 @@
# -*- coding: utf-8 -*-
-import datetime
from south.db import db
from south.v2 import SchemaMigration
-from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Branding.group'
- db.add_column('hashcut_branding', 'group',
+ db.add_column('hashcut_branding', 'group', # @UndefinedVariable
self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.Group'], null=True),
keep_default=False)
def backwards(self, orm):
# Deleting field 'Branding.group'
- db.delete_column('hashcut_branding', 'group_id')
+ db.delete_column('hashcut_branding', 'group_id') # @UndefinedVariable
models = {
--- a/src/hashcut/migrations/0004_add_group_datas.py Mon May 06 16:12:54 2013 +0200
+++ b/src/hashcut/migrations/0004_add_group_datas.py Fri May 24 23:28:50 2013 +0200
@@ -1,10 +1,7 @@
# -*- coding: utf-8 -*-
-import datetime
-from south.db import db
-from south.v2 import DataMigration
-from django.db import models
from django.contrib.auth.models import User, Group
from ldt.security.cache import cached_assign
+from south.v2 import DataMigration
class Migration(DataMigration):
--- a/src/hashcut/templates/mashup_all_contents.html Mon May 06 16:12:54 2013 +0200
+++ b/src/hashcut/templates/mashup_all_contents.html Fri May 24 23:28:50 2013 +0200
@@ -19,8 +19,8 @@
</div>
<div class="profil-wrap">
<ul>
- <li><a href="{% url mashup_home branding=branding %}" class="all-hashcut">{% trans "Home" %}</a></li>
- <li><a href="{% url mashup_edit branding=branding %}" class="new-hashcut">{% trans "New hashcut" %}</a></li>
+ <li><a href="{% url 'mashup_home' branding=branding %}" class="all-hashcut">{% trans "Home" %}</a></li>
+ <li><a href="{% url 'mashup_edit' branding=branding %}" class="new-hashcut">{% trans "New hashcut" %}</a></li>
<li><a href="#user" class="my-profil open-popin">{% trans "My profile" %}</a></li>
</ul>
</div>
@@ -33,18 +33,18 @@
<div class="pagination">
{% if results.has_previous %}
- <a href="{% url mashup_all_contents branding=branding %}?page={{ results.previous_page_number }}" >{% trans "Previous" %}</a>
+ <a href="{% url 'mashup_all_contents' branding=branding %}?page={{ results.previous_page_number }}" >{% trans "Previous" %}</a>
{% endif %}
{% if results.paginator.num_pages > 1 %}
{% for i in results.paginator.num_pages|get_range %}
- <a {% if i|add:'1' == results.number %} class="active"{% endif %} href="{% url mashup_all_contents branding=branding %}?page={{i|add:'1'}}">{{i|add:'1'}}</a>
+ <a {% if i|add:'1' == results.number %} class="active"{% endif %} href="{% url 'mashup_all_contents' branding=branding %}?page={{i|add:'1'}}">{{i|add:'1'}}</a>
{% endfor %}
{% endif %}
{% if results.has_next %}
- <a href="{% url mashup_all_contents branding=branding %}?page={{ results.next_page_number }}">{% trans "Next" %}</a>
+ <a href="{% url 'mashup_all_contents' branding=branding %}?page={{ results.next_page_number }}">{% trans "Next" %}</a>
{% endif %}
{% if results.paginator.num_pages > 1 %}
- <a href="{% url mashup_all_contents branding=branding %}?page=x">({% trans "All" %})</a>
+ <a href="{% url 'mashup_all_contents' branding=branding %}?page=x">({% trans "All" %})</a>
{% endif %}
</p>
</div>
@@ -52,8 +52,8 @@
<div class="hashcut-video-wrap profil">
{% for content in results.object_list %}
<div class="video-item">
- <a href="{% url mashup_content branding=branding ctt_id=content.iri_id %}" class="screenshot">{% thumbnail content.image "302x202" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt=""/>{% empty %} {% endthumbnail %}</a>
- <h3><a class="title" href="{% url mashup_content branding=branding ctt_id=content.iri_id %}">{% if content.title|length > 30 %}{{content.title|slice:":30"}}...{% else %}{{content.title}}{% endif %}</a> | <span class="duration">{{content.duration|str_duration:"h"}}</span></h3>
+ <a href="{% url 'mashup_content' branding=branding ctt_id=content.iri_id %}" class="screenshot">{% thumbnail content.image "302x202" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt=""/>{% empty %} {% endthumbnail %}</a>
+ <h3><a class="title" href="{% url 'mashup_content' branding=branding ctt_id=content.iri_id %}">{% if content.title|length > 30 %}{{content.title|slice:":30"}}...{% else %}{{content.title}}{% endif %}</a> | <span class="duration">{{content.duration|str_duration:"h"}}</span></h3>
</div>
{% endfor %}
</div>
--- a/src/hashcut/templates/mashup_all_mashups.html Mon May 06 16:12:54 2013 +0200
+++ b/src/hashcut/templates/mashup_all_mashups.html Fri May 24 23:28:50 2013 +0200
@@ -19,8 +19,8 @@
</div>
<div class="profil-wrap">
<ul>
- <li><a href="{% url mashup_home branding=branding %}" class="all-hashcut">{% trans "Home" %}</a></li>
- <li><a href="{% url mashup_edit branding=branding %}" class="new-hashcut">{% trans "New hashcut" %}</a></li>
+ <li><a href="{% url 'mashup_home' branding=branding %}" class="all-hashcut">{% trans "Home" %}</a></li>
+ <li><a href="{% url 'mashup_edit' branding=branding %}" class="new-hashcut">{% trans "New hashcut" %}</a></li>
<li><a href="#user" class="my-profil open-popin">{% trans "My profile" %}</a></li>
</ul>
</div>
@@ -33,18 +33,18 @@
<div class="pagination">
{% if results.has_previous %}
- <a href="{% url mashup_all branding=branding %}?page={{ results.previous_page_number }}" >{% trans "Previous" %}</a>
+ <a href="{% url 'mashup_all' branding=branding %}?page={{ results.previous_page_number }}" >{% trans "Previous" %}</a>
{% endif %}
{% if results.paginator.num_pages > 1 %}
{% for i in results.paginator.num_pages|get_range %}
- <a {% if i|add:'1' == results.number %} class="active"{% endif %} href="{% url mashup_all branding=branding %}?page={{i|add:'1'}}">{{i|add:'1'}}</a>
+ <a {% if i|add:'1' == results.number %} class="active"{% endif %} href="{% url 'mashup_all' branding=branding %}?page={{i|add:'1'}}">{{i|add:'1'}}</a>
{% endfor %}
{% endif %}
{% if results.has_next %}
- <a href="{% url mashup_all branding=branding %}?page={{ results.next_page_number }}">{% trans "Next" %}</a>
+ <a href="{% url 'mashup_all' branding=branding %}?page={{ results.next_page_number }}">{% trans "Next" %}</a>
{% endif %}
{% if results.paginator.num_pages > 1 %}
- <a href="{% url mashup_all branding=branding %}?page=x">({% trans "All" %})</a>
+ <a href="{% url 'mashup_all' branding=branding %}?page=x">({% trans "All" %})</a>
{% endif %}
</p>
</div>
@@ -52,8 +52,8 @@
<div class="hashcut-video-wrap profil">
{% for m in results.object_list %}
<div class="video-item">
- <a href="{% url mashup_hashcut branding=branding ldt_id=m.project.ldt_id %}" class="screenshot">{% thumbnail m.project.image "302x202" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt=""/>{% empty %} {% endthumbnail %}</a>
- <h3><a class="title" href="{% url mashup_hashcut branding=branding ldt_id=m.project.ldt_id %}">{% if m.project.title|length > 30 %}{{m.project.title|slice:":30"}}...{% else %}{{m.project.title}}{% endif %}</a> par <a class="author" href="{% url mashup_profile branding=branding username=m.creator %}">{{ m.creator }}</a><!-- | <span class="duration">02:24</span> --></h3>
+ <a href="{% url 'mashup_hashcut branding=branding' ldt_id=m.project.ldt_id %}" class="screenshot">{% thumbnail m.project.image "302x202" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt=""/>{% empty %} {% endthumbnail %}</a>
+ <h3><a class="title" href="{% url 'mashup_hashcut' branding=branding ldt_id=m.project.ldt_id %}">{% if m.project.title|length > 30 %}{{m.project.title|slice:":30"}}...{% else %}{{m.project.title}}{% endif %}</a> par <a class="author" href="{% url 'mashup_profile' branding=branding username=m.creator %}">{{ m.creator }}</a><!-- | <span class="duration">02:24</span> --></h3>
</div>
{% endfor %}
</div>
--- a/src/hashcut/templates/mashup_content.html Mon May 06 16:12:54 2013 +0200
+++ b/src/hashcut/templates/mashup_content.html Fri May 24 23:28:50 2013 +0200
@@ -14,11 +14,11 @@
<script type="text/javascript" src="{% static 'hashcut/js/hashcut.js' %}"></script>
<script type="text/javascript">
IriSP.endpoints = {
- content: "{% url api_dispatch_list api_name='1.0' resource_name='contents' %}",
- project: "{% url api_dispatch_list api_name='1.0' resource_name='projects' %}",
- segment: "{% url api_dispatch_list api_name='1.0' resource_name='segments' %}",
- ldt: "{% url projectjson_id id='__PROJECT_ID__' %}",
- hashcut_page: "{% url mashup_hashcut branding=branding ldt_id='__PROJECT_ID__' %}"
+ content: "{% url 'api_dispatch_list' api_name='1.0' resource_name='contents' %}",
+ project: "{% url 'api_dispatch_list' api_name='1.0' resource_name='projects' %}",
+ segment: "{% url 'api_dispatch_list' api_name='1.0' resource_name='segments' %}",
+ ldt: "{% url 'projectjson_id' id='__PROJECT_ID__' %}",
+ hashcut_page: "{% url 'mashup_hashcut' branding=branding ldt_id='__PROJECT_ID__' %}"
};
$(function() {
@@ -50,8 +50,8 @@
<div class="Ldt-Social"></div>
<div class="profil-wrap">
<ul>
- <li><a href="{% url mashup_home branding=branding %}" class="all-hashcut">{% trans "Home" %}</a></li>
- <li><a href="{% url mashup_edit branding=branding %}" class="new-hashcut">{% trans "New hashcut" %}</a></li>
+ <li><a href="{% url 'mashup_home' branding=branding %}" class="all-hashcut">{% trans "Home" %}</a></li>
+ <li><a href="{% url 'mashup_edit' branding=branding %}" class="new-hashcut">{% trans "New hashcut" %}</a></li>
<li><a href="#user" class="my-profil open-popin">{% trans "My profile" %}</a></li>
</ul>
</div>
--- a/src/hashcut/templates/mashup_edit.html Mon May 06 16:12:54 2013 +0200
+++ b/src/hashcut/templates/mashup_edit.html Fri May 24 23:28:50 2013 +0200
@@ -16,12 +16,12 @@
<script type="text/javascript" src="{% static 'hashcut/js/hashcut.js' %}"></script>
<script type="text/javascript">
IriSP.endpoints = {
- content: "{% url api_dispatch_list api_name='1.0' resource_name='contents' %}",
- //project: "{% url api_dispatch_list api_name='1.0' resource_name='projects' %}",
- project: "{% url mashup_save branding=branding %}",
- segment: "{% url api_dispatch_list api_name='1.0' resource_name='segments' %}",
- ldt: "{% url projectjson_id id='__PROJECT_ID__' %}",
- hashcut_page: "{% url mashup_hashcut branding=branding ldt_id='__PROJECT_ID__' %}"
+ content: "{% url 'api_dispatch_list' api_name='1.0' resource_name='contents' %}",
+ //project: "{% url 'api_dispatch_list' api_name='1.0' resource_name='projects' %}",
+ project: "{% url 'mashup_save' branding=branding %}",
+ segment: "{% url 'api_dispatch_list' api_name='1.0' resource_name='segments' %}",
+ ldt: "{% url 'projectjson_id' id='__PROJECT_ID__' %}",
+ hashcut_page: "{% url 'mashup_hashcut' branding=branding ldt_id='__PROJECT_ID__' %}"
};
$(function() {
IriSP.video_url_transform = function(oldurl) {
@@ -74,7 +74,7 @@
</div>
<div class="profil-wrap">
<ul class="space-top">
- <li><a href="{% url mashup_home branding=branding %}" class="all-hashcut">{% trans "Home" %}</a></li>
+ <li><a href="{% url 'mashup_home' branding=branding %}" class="all-hashcut">{% trans "Home" %}</a></li>
<li><a href="#user" class="my-profil open-popin">{% trans "My profile" %}</a></li>
</ul>
</div>
--- a/src/hashcut/templates/mashup_hashcut.html Mon May 06 16:12:54 2013 +0200
+++ b/src/hashcut/templates/mashup_hashcut.html Fri May 24 23:28:50 2013 +0200
@@ -14,11 +14,11 @@
<script type="text/javascript" src="{% static 'hashcut/js/hashcut.js' %}"></script>
<script type="text/javascript">
IriSP.endpoints = {
- content: "{% url api_dispatch_list api_name='1.0' resource_name='contents' %}",
- project: "{% url api_dispatch_list api_name='1.0' resource_name='projects' %}",
- segment: "{% url api_dispatch_list api_name='1.0' resource_name='segments' %}",
- ldt: "{% url projectjson_id id='__PROJECT_ID__' %}",
- media_page: "{% url mashup_content branding=branding ctt_id='__CONTENT_ID__' %}"
+ content: "{% url 'api_dispatch_list' api_name='1.0' resource_name='contents' %}",
+ project: "{% url 'api_dispatch_list' api_name='1.0' resource_name='projects' %}",
+ segment: "{% url 'api_dispatch_list' api_name='1.0' resource_name='segments' %}",
+ ldt: "{% url 'projectjson_id' id='__PROJECT_ID__' %}",
+ media_page: "{% url 'mashup_content' branding=branding ctt_id='__CONTENT_ID__' %}"
};
$(function() {
@@ -50,8 +50,8 @@
<div class="Ldt-Social"></div>
<div class="profil-wrap">
<ul>
- <li><a href="{% url mashup_home branding=branding %}" class="all-hashcut">Accueil</a></li>
- <li><a href="{% url mashup_edit branding=branding %}" class="new-hashcut">Créer un Hashcut</a></li>
+ <li><a href="{% url 'mashup_home' branding=branding %}" class="all-hashcut">Accueil</a></li>
+ <li><a href="{% url 'mashup_edit' branding=branding %}" class="new-hashcut">Créer un Hashcut</a></li>
<li><a href="#user" class="my-profil open-popin">Mon profil</a></li>
</ul>
</div>
@@ -147,7 +147,7 @@
</tr>
<tr class="info-author">
<th>{% trans 'Author:' %}</th>
- <td><a href="{% url mashup_profile branding=branding username=proj.created_by %}">{{proj.created_by}}</a></td>
+ <td><a href="{% url 'mashup_profile' branding=branding username=proj.created_by %}">{{proj.created_by}}</a></td>
</tr>
<tr class="info-description">
<th>{% trans 'Description:' %}</th>
--- a/src/hashcut/templates/mashup_home.html Mon May 06 16:12:54 2013 +0200
+++ b/src/hashcut/templates/mashup_home.html Fri May 24 23:28:50 2013 +0200
@@ -30,12 +30,12 @@
<script type="text/javascript" src="{% static 'hashcut/lib/jquery.min.js' %}"></script>
<script type="text/javascript" src="{% static 'hashcut/lib/jquery-ui.min.js' %}"></script>
<script type="text/javascript" src="{% static 'hashcut/js/common.js' %}"></script>
- <script type="text/javascript" src="{% url jsi18n 'hashcut' %}"></script>
+ <script type="text/javascript" src="{% url 'jsi18n' 'hashcut' %}"></script>
{% if not user.is_authenticated %}
<script type="text/javascript">
/* Forbid access to edit page if not connected */
$(function() {
- $("a[href='{% url mashup_edit branding=branding %}']").click(function() {
+ $("a[href='{% url 'mashup_edit' branding=branding %}']").click(function() {
$("#user").show();
return false;
});
@@ -58,7 +58,7 @@
{% include 'partial/mashup_popin_user.html' %}
{% include 'partial/hashcut_logo.html' %}
<div class="title-header">
- <h2><a href="{% url mashup_edit branding=branding %}">{% trans "Create a new hashcut!" %}</a></h2>
+ <h2><a href="{% url 'mashup_edit' branding=branding %}">{% trans "Create a new hashcut!" %}</a></h2>
</div>
<div class="profil-wrap">
<ul class="space-top-2">
@@ -79,14 +79,14 @@
<div class="hashcut-video-wrap news">
<div class="video-item">
{% if m1 %}
- <a href="{% url mashup_hashcut branding=branding ldt_id=m1.project.ldt_id %}" class="screenshot">{% thumbnail m1.project.image "302x202" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt=""/>{% empty %} {% endthumbnail %}</a>
- <h3><a class="title" href="{% url mashup_hashcut branding=branding ldt_id=m1.project.ldt_id %}">{{ m1.project.title }}</a> {% trans "by" %} <a class="author" href="{% url mashup_profile branding=branding username=m1.creator %}">{{ m1.creator }}</a><!-- | <span class="duration">02:24</span> --></h3>
+ <a href="{% url 'mashup_hashcut' branding=branding ldt_id=m1.project.ldt_id %}" class="screenshot">{% thumbnail m1.project.image "302x202" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt=""/>{% empty %} {% endthumbnail %}</a>
+ <h3><a class="title" href="{% url 'mashup_hashcut' branding=branding ldt_id=m1.project.ldt_id %}">{{ m1.project.title }}</a> {% trans "by" %} <a class="author" href="{% url 'mashup_profile' branding=branding username=m1.creator %}">{{ m1.creator }}</a><!-- | <span class="duration">02:24</span> --></h3>
{% endif %}
</div>
<div class="video-item">
{% if m2 %}
- <a href="{% url mashup_hashcut branding=branding ldt_id=m2.project.ldt_id %}" class="screenshot">{% thumbnail m2.project.image "302x202" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt=""/>{% empty %} {% endthumbnail %}</a>
- <h3><a class="title" href="{% url mashup_hashcut branding=branding ldt_id=m2.project.ldt_id %}">{{ m2.project.title }}</a> {% trans "by" %} <a class="author" href="{% url mashup_profile branding=branding username=m2.creator %}">{{ m2.creator }}</a><!-- | <span class="duration">02:24</span> --></h3>
+ <a href="{% url 'mashup_hashcut' branding=branding ldt_id=m2.project.ldt_id %}" class="screenshot">{% thumbnail m2.project.image "302x202" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt=""/>{% empty %} {% endthumbnail %}</a>
+ <h3><a class="title" href="{% url 'mashup_hashcut' branding=branding ldt_id=m2.project.ldt_id %}">{{ m2.project.title }}</a> {% trans "by" %} <a class="author" href="{% url 'mashup_profile' branding=branding username=m2.creator %}">{{ m2.creator }}</a><!-- | <span class="duration">02:24</span> --></h3>
{% endif %}
</div>
</div>
@@ -95,28 +95,28 @@
<div class="hashcut-video-wrap last">
{% for m in mashups %}
<div class="video-item">
- <a href="{% url mashup_hashcut branding=branding ldt_id=m.project.ldt_id %}" class="screenshot">{% thumbnail m.project.image "142x95" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt=""/>{% empty %} {% endthumbnail %}</a>
- <h3><a class="title" href="{% url mashup_hashcut branding=branding ldt_id=m.project.ldt_id %}">{% if m.project.title|length > 30 %}{{m.project.title|slice:":30"}}...{% else %}{{m.project.title}}{% endif %}</a> {% trans "by" %} <a class="author" href="{% url mashup_profile branding=branding username=m.creator %}">{{ m.creator }}</a><!-- | <span class="duration">02:24</span> --></h3>
+ <a href="{% url 'mashup_hashcut' branding=branding ldt_id=m.project.ldt_id %}" class="screenshot">{% thumbnail m.project.image "142x95" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt=""/>{% empty %} {% endthumbnail %}</a>
+ <h3><a class="title" href="{% url 'mashup_hashcut' branding=branding ldt_id=m.project.ldt_id %}">{% if m.project.title|length > 30 %}{{m.project.title|slice:":30"}}...{% else %}{{m.project.title}}{% endif %}</a> {% trans "by" %} <a class="author" href="{% url 'mashup_profile' branding=branding username=m.creator %}">{{ m.creator }}</a><!-- | <span class="duration">02:24</span> --></h3>
</div>
{% endfor %}
</div>
<div class="pagination">
- <a href="{% url mashup_all branding=branding %}">{% trans 'All Hashcuts' %}</a>
+ <a href="{% url 'mashup_all' branding=branding %}">{% trans 'All Hashcuts' %}</a>
</div>
<h2>{% trans "Available videos" %}</h2>
<div class="hashcut-video-wrap last">
{% for content in contents %}
<div class="video-item">
- <a href="{% url mashup_content branding=branding ctt_id=content.iri_id %}" class="screenshot">{% thumbnail content.image "142x95" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt=""/>{% empty %} {% endthumbnail %}</a>
- <h3><a class="title" href="{% url mashup_content branding=branding ctt_id=content.iri_id %}">{% if content.title|length > 30 %}{{content.title|slice:":30"}}...{% else %}{{content.title}}{% endif %}</a> | <span class="duration">{{content.duration|str_duration:"h"}}</span></h3>
+ <a href="{% url 'mashup_content' branding=branding ctt_id=content.iri_id %}" class="screenshot">{% thumbnail content.image "142x95" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt=""/>{% empty %} {% endthumbnail %}</a>
+ <h3><a class="title" href="{% url 'mashup_content' branding=branding ctt_id=content.iri_id %}">{% if content.title|length > 30 %}{{content.title|slice:":30"}}...{% else %}{{content.title}}{% endif %}</a> | <span class="duration">{{content.duration|str_duration:"h"}}</span></h3>
</div>
{% endfor %}
</div>
<div class="pagination">
- <a href="{% url mashup_all_contents branding=branding %}">{% trans 'All source videos' %}</a>
+ <a href="{% url 'mashup_all_contents' branding=branding %}">{% trans 'All source videos' %}</a>
</div>
</div><!-- left-content -->
@@ -135,7 +135,7 @@
</li>
<li class="next-step"></li>
<li class="creation">
- <h3><a href="{% url mashup_edit branding=branding %}">2. {% trans "Create a new hashcut" %}</a></h3>
+ <h3><a href="{% url 'mashup_edit' branding=branding %}">2. {% trans "Create a new hashcut" %}</a></h3>
<p>{% trans "Choose videos, define and organize segments and comment them to create your own hashcut." %}</p>
</li>
<li class="next-step"></li>
--- a/src/hashcut/templates/mashup_profile.html Mon May 06 16:12:54 2013 +0200
+++ b/src/hashcut/templates/mashup_profile.html Fri May 24 23:28:50 2013 +0200
@@ -24,8 +24,8 @@
<div class="Ldt-Social"></div>
<div class="profil-wrap">
<ul>
- <li><a href="{% url mashup_home branding=branding %}" class="all-hashcut">{% trans "Home" %}</a></li>
- <li><a href="{% url mashup_edit branding=branding %}" class="new-hashcut">{% trans "New hashcut" %}</a></li>
+ <li><a href="{% url 'mashup_home' branding=branding %}" class="all-hashcut">{% trans "Home" %}</a></li>
+ <li><a href="{% url 'mashup_edit' branding=branding %}" class="new-hashcut">{% trans "New hashcut" %}</a></li>
<li><a href="#user" class="my-profil open-popin">{% trans "My profile" %}</a></li>
</ul>
</div>
@@ -39,8 +39,8 @@
<div class="hashcut-video-wrap profil">
{% for m in mashups %}
<div class="video-item">
- <a href="{% url mashup_hashcut branding=branding ldt_id=m.project.ldt_id %}" class="screenshot">{% thumbnail m.project.image "302x202" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt=""/>{% empty %} {% endthumbnail %}</a>
- <h3><a class="title" href="{% url mashup_hashcut branding=branding ldt_id=m.project.ldt_id %}">{% if m.project.title|length > 30 %}{{m.project.title|slice:":30"}}...{% else %}{{m.project.title}}{% endif %}</a><!-- | <span class="duration">02:24</span> --></h3>
+ <a href="{% url 'mashup_hashcut' branding=branding ldt_id=m.project.ldt_id %}" class="screenshot">{% thumbnail m.project.image "302x202" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt=""/>{% empty %} {% endthumbnail %}</a>
+ <h3><a class="title" href="{% url 'mashup_hashcut' branding=branding ldt_id=m.project.ldt_id %}">{% if m.project.title|length > 30 %}{{m.project.title|slice:":30"}}...{% else %}{{m.project.title}}{% endif %}</a><!-- | <span class="duration">02:24</span> --></h3>
</div>
{% endfor %}
</div>
--- a/src/hashcut/templates/partial/bpi_top_header.html Mon May 06 16:12:54 2013 +0200
+++ b/src/hashcut/templates/partial/bpi_top_header.html Fri May 24 23:28:50 2013 +0200
@@ -1,6 +1,6 @@
{% load static %}
<div class="wrap-header-top">
<div class="wrap-header-top-content">
- <a title="Bibliothèque Publique d'Information" href="{% url mashup_home branding=branding %}"><img src="{% static 'hashcut/bpi/img/pompidou-logo.png' %}" alt="Bibliothèque centre Pompidou" /></a>
+ <a title="Bibliothèque Publique d'Information" href="{% url 'mashup_home' branding=branding %}"><img src="{% static 'hashcut/bpi/img/pompidou-logo.png' %}" alt="Bibliothèque centre Pompidou" /></a>
</div>
</div><!-- wrap-header-top -->
\ No newline at end of file
--- a/src/hashcut/templates/partial/hashcut_logo.html Mon May 06 16:12:54 2013 +0200
+++ b/src/hashcut/templates/partial/hashcut_logo.html Fri May 24 23:28:50 2013 +0200
@@ -1,5 +1,5 @@
{% load static %}
- <h1><a title="Hashcut - Le Mashup cliquable" class="clearfix" href="{% url mashup_home branding=branding %}">
+ <h1><a title="Hashcut - Le Mashup cliquable" class="clearfix" href="{% url 'mashup_home' branding=branding %}">
<img src="{% static 'hashcut' %}/{{branding}}/img/hashcut-logo.png" alt="Hashcut" />
<span>Le Mashup<br />Cliquable</span>
</a></h1>
\ No newline at end of file
--- a/src/hashcut/templates/partial/mashup_popin_user.html Mon May 06 16:12:54 2013 +0200
+++ b/src/hashcut/templates/partial/mashup_popin_user.html Fri May 24 23:28:50 2013 +0200
@@ -8,18 +8,18 @@
<div class="user-screen info">
<h2>{{user.username}}</h2>
<h3>{{user.email}}</h3>
- <a href="{% url mashup_profile branding=branding username=user.username %}" class="nb-hashcut">{% blocktrans count counter=nb_mashup_creator %}{{nb_mashup_creator}} Hashcut{% plural %}{{nb_mashup_creator}} Hashcuts{% endblocktrans %}</a>
+ <a href="{% url 'mashup_profile' branding=branding username=user.username %}" class="nb-hashcut">{% blocktrans count counter=nb_mashup_creator %}{{nb_mashup_creator}} Hashcut{% plural %}{{nb_mashup_creator}} Hashcuts{% endblocktrans %}</a>
<p>
<a href="#" class="change-account button">{% trans 'Switch account' %}</a>
</p>
<p>
- <a href="{% url mashup_logout branding=branding %}" class="logout-button button">{% trans 'Log out' %}</a>
+ <a href="{% url 'mashup_logout' branding=branding %}" class="logout-button button">{% trans 'Log out' %}</a>
</p>
</div>
{% endif %}
<div class="user-screen signup hide">
<h2>{% trans 'Create account:' %}</h2>
- <form action="{% url mashup_create_user branding=branding %}" class="signup-form" method="post">
+ <form action="{% url 'mashup_create_user' branding=branding %}" class="signup-form" method="post">
{% csrf_token %}
<p>
<label for="signup-pseudo">{% trans 'Login:' %}</label>
@@ -44,7 +44,7 @@
</div>
<div class="user-screen login{% if user.is_authenticated %} hide{% endif %}">
<h2>{% trans 'Log In:' %}</h2>
- <form action="{% url mashup_identicate_user branding=branding %}" class="login-form" method="post">
+ <form action="{% url 'mashup_identicate_user' branding=branding %}" class="login-form" method="post">
{% csrf_token %}
<p>
<label for="signup-pseudo">{% trans 'Login:' %}</label>
--- a/src/hashcut/urls.py Mon May 06 16:12:54 2013 +0200
+++ b/src/hashcut/urls.py Fri May 24 23:28:50 2013 +0200
@@ -1,4 +1,4 @@
-from django.conf.urls.defaults import patterns, url
+from django.conf.urls import patterns, url
from hashcut.views import MashupHome, MashupEdit, MashupHashcut, MashupContent, MashupProfile, MashupAllMashups,\
MashupAllContents, MashupCreateUser, MashupIdenticateUser, MashupLogOut