--- a/src/ldt/ldt/ldt_utils/models.py Fri Jan 27 16:27:47 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/models.py Fri Jan 27 17:21:56 2012 +0100
@@ -525,7 +525,7 @@
assign('change_project', user, project)
for content in contents:
- project.add_contents([content])
+ project.contents.add(content)
if set_icon:
project.set_icon()
@@ -542,7 +542,7 @@
if group:
assign('view_project', group, project)
for content in self.contents.all():
- project.add_contents([content])
+ project.contents.add(content)
return project
def publish(self, allow_write=False):
--- a/src/ldt/ldt/ldt_utils/utils.py Fri Jan 27 16:27:47 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/utils.py Fri Jan 27 17:21:56 2012 +0100
@@ -371,6 +371,7 @@
content_node = lxml.etree.SubElement(annotations, 'content')
content_node.set('id', content.iri_id)
ensemble = lxml.etree.SubElement(content_node, 'ensemble')
+ ensemble.set('title', _('Personal cutting'))
ensemble.set('id', ensemble_id)
ensemble.set('author', 'undefined')
ensemble.set('abstract', '')
--- a/src/ldt/ldt/ldt_utils/views/front.py Fri Jan 27 16:27:47 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/views/front.py Fri Jan 27 17:21:56 2012 +0100
@@ -7,7 +7,7 @@
from django.template import RequestContext
from django.utils import simplejson
from guardian.shortcuts import get_objects_for_group
-from ldt.ldt_utils.models import Content, Project, Segment
+from ldt.ldt_utils.models import Content, Project
from ldt.ldt_utils.views.workspace import search_index as ws_search_index, search_listing as ws_search_listing
from ldt.security.utils import add_change_attr
from tagging.models import Tag, TaggedItem
@@ -90,7 +90,7 @@
else:
# The main project for the content
proj = Project.safe_objects.filter(contents__in=[content])[0]
- else :
+ else:
proj = Project.safe_objects.get(ldt_id=project_id)
# Vars for player