correct errors
authorymh <ymh.work@gmail.com>
Tue, 01 Jun 2010 19:07:23 +0200
changeset 35 8b65c9054eac
parent 34 05d10640919a
child 36 bbe6f42d42b2
correct errors
.hgignore
.project
.pydevproject
sbin/create_python_env.py
web/blinkster/.htaccess.tmpl
web/blinkster/__init__.py
web/blinkster/handler.py
web/blinkster/handler.py.tmpl
web/blinkster/ldt/__init__.py
web/blinkster/ldt/contentindexer.py
web/blinkster/ldt/fileimport.py
web/blinkster/ldt/forms.py
web/blinkster/ldt/models.py
web/blinkster/ldt/utils.py
web/blinkster/ldt/views.py
web/blinkster/models.py
web/blinkster/settings.py
web/blinkster/translation.py
web/blinkster/urls.py
web/blinkster/utils/__init__.py
web/blinkster/utils/log.py
web/blinkster/utils/xml.py
web/blinkster/utils/zipfileext.py
--- a/.hgignore	Tue Jun 01 10:44:27 2010 +0200
+++ b/.hgignore	Tue Jun 01 19:07:23 2010 +0200
@@ -17,4 +17,8 @@
 syntax: regexp
 ^web/static/media/photologue$
 syntax: regexp
-^sbin/blinkster-boot\.py$
\ No newline at end of file
+^sbin/blinkster-boot\.py$
+syntax: regexp
+^sbin/bvenv$
+syntax: regexp
+^web/blinkster/handler\.py$
\ No newline at end of file
--- a/.project	Tue Jun 01 10:44:27 2010 +0200
+++ b/.project	Tue Jun 01 19:07:23 2010 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>pocketfilms</name>
+	<name>blinkster</name>
 	<comment></comment>
 	<projects>
 	</projects>
@@ -13,5 +13,6 @@
 	</buildSpec>
 	<natures>
 		<nature>org.python.pydev.pythonNature</nature>
+		<nature>org.python.pydev.django.djangoNature</nature>
 	</natures>
 </projectDescription>
--- a/.pydevproject	Tue Jun 01 10:44:27 2010 +0200
+++ b/.pydevproject	Tue Jun 01 19:07:23 2010 +0200
@@ -1,14 +1,14 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <?eclipse-pydev version="1.0"?>
 
 <pydev_project>
 <pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.6</pydev_property>
-<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">python_blinkster</pydev_property>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Blinkster</pydev_property>
 <pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
 <path>/blinkster/web/blinkster</path>
 <path>/blinkster/web/lib</path>
 </pydev_pathproperty>
 <pydev_pathproperty name="org.python.pydev.PROJECT_EXTERNAL_SOURCE_PATH">
-<path>/Users/ymh/dev/workspace/blinkster/sbin/blinkster/lib/python2.6/site-packages</path>
+<path>/Volumes/Data/Dev/workspace/blinkster/sbin/bvenv/lib/python2.5/site-packages</path>
 </pydev_pathproperty>
 </pydev_project>
--- a/sbin/create_python_env.py	Tue Jun 01 10:44:27 2010 +0200
+++ b/sbin/create_python_env.py	Tue Jun 01 19:07:23 2010 +0200
@@ -10,6 +10,8 @@
 
 - virtualenv --distribute --no-site-packages venv
 
+- python blinkster-boot.py --distribute --no-site-packages --index-url=http://pypi.websushi.org/ --clear bvenv
+
 """
 import os
 import subprocess
@@ -38,24 +40,24 @@
 import urllib
 import platform
 
+PSYCOPG2_URL = 'http://initd.org/pub/software/psycopg/psycopg2-2.2.1.tar.gz'
 FOURSUITE_XML_URL = 'ftp://ftp.4suite.org/pub/4Suite/4Suite-XML-1.0.2.tar.bz2'
 PY_LUCENE_URL = 'http://apache.crihan.fr/dist/lucene/pylucene/pylucene-3.0.1-1-src.tar.gz'
+PIL_URL = 'http://effbot.org/downloads/Imaging-1.1.7.tar.gz'
+INDEX_URL = 'http://pypi.python.org/simple/'
+PYXML_URL = "http://sourceforge.net/projects/pyxml/files/pyxml/0.8.4/PyXML-0.8.4.tar.gz/download"
+
 
 def extend_parser(parser):
-    pass
+    parser.add_option(
+        '--index-url',
+        metavar='INDEX_URL',
+        dest='index_url',
+        default='',
+        help='base URL of Python Package Index')
 
 def adjust_options(options, args):
-    if not args:
-        return # caller will raise error
-    
-    # We're actually going to build the venv in a subdirectory
-    base_dir = args[0]
-    if len(args) > 1:
-        venv_name = args[1]
-    else:
-        venv_name = "blinkster"
-        
-    args[0] = join(base_dir, venv_name)
+    pass
 
 
 def after_install(options, home_dir):
@@ -66,14 +68,22 @@
     ensure_dir(tmp_dir)
     logger.indent += 2
     try:
-        call_subprocess([os.path.abspath(os.path.join(home_dir, 'bin', 'pip')) ,'-E '+ os.path.abspath(home_dir), 'psycopg2', 'pil', 'pyxml'],
+        call_subprocess([os.path.abspath(os.path.join(home_dir, 'bin', 'pip')), 'install', '-E', os.path.abspath(home_dir), PSYCOPG2_URL],
                         cwd=os.path.abspath(tmp_dir),
                         filter_stdout=filter_python_develop,
-                        show_stdout=False)
+                        show_stdout=True)
+        call_subprocess([os.path.abspath(os.path.join(home_dir, 'bin', 'pip')), 'install', '-E', os.path.abspath(home_dir), PIL_URL],
+                        cwd=os.path.abspath(tmp_dir),
+                        filter_stdout=filter_python_develop,
+                        show_stdout=True)
+        call_subprocess([os.path.abspath(os.path.join(home_dir, 'bin', 'pip')), 'install', '-E', os.path.abspath(home_dir), PYXML_URL],
+                        cwd=os.path.abspath(tmp_dir),
+                        filter_stdout=filter_python_develop,
+                        show_stdout=True)
         call_subprocess([os.path.abspath(os.path.join(home_dir, 'bin', 'easy_install')), FOURSUITE_XML_URL],
                         cwd=os.path.abspath(tmp_dir),
                         filter_stdout=filter_python_develop,
-                        show_stdout=False)
+                        show_stdout=True)
 
         #get pylucene
         pylucene_src = os.path.join(src_dir,"pylucene.tar.gz")
@@ -89,7 +99,7 @@
         call_subprocess([os.path.abspath(os.path.join(home_dir, 'bin', 'python')), 'setup.py', 'install'],
                         cwd=os.path.abspath(os.path.join(pylucene_src_path,"jcc")),
                         filter_stdout=filter_python_develop,
-                        show_stdout=False)
+                        show_stdout=True)
         #install pylucene       
         #modify makefile
         makefile_path = os.path.join(pylucene_src_path,"Makefile")
@@ -97,19 +107,22 @@
 
         destination= open( makefile_path, "w" )
         source= open( makefile_path+"~", "r" )
-        destination.write("PREFIX_PYTHON="+os.path.abspath(home_dir))
-        destination.write("ANT=ant")
-        destination.write("PYTHON=$(PREFIX_PYTHON)/bin/python")
+        destination.write("PREFIX_PYTHON="+os.path.abspath(home_dir)+"\\n")
+        destination.write("ANT=ant\\n")
+        destination.write("PYTHON=$(PREFIX_PYTHON)/bin/python\\n")
         system_str = platform.system()
         if system_str == "Darwin":
-            destination.write("JCC=$(PYTHON) -m jcc.__main__ --shared --arch x86_64 --arch i386")
-            destination.write("NUM_FILES=2")
+            if sys.version_info > (2,6):
+                destination.write("JCC=$(PYTHON) -m jcc.__main__ --shared --arch x86_64 --arch i386\\n")
+            else:
+                destination.write("JCC=$(PYTHON) -m jcc --shared --arch x86_64 --arch i386\\n")
+            destination.write("NUM_FILES=2\\n")
         elif system_str == "Windows":
-            destination.write("JCC=$(PYTHON) -m jcc.__main__ --shared --arch x86_64 --arch i386")
-            destination.write("NUM_FILES=2")
+            destination.write("JCC=$(PYTHON) -m jcc.__main__ --shared --arch x86_64 --arch i386\\n")
+            destination.write("NUM_FILES=2\\n")
         else:
-            destination.write("JCC=$(PYTHON) -m jcc --shared")
-            destination.write("NUM_FILES=2")
+            destination.write("JCC=$(PYTHON) -m jcc --shared\\n")
+            destination.write("NUM_FILES=2\\n")
         for line in source:
             destination.write( line )
         source.close()
@@ -119,11 +132,8 @@
         call_subprocess(['make', 'install'],
                         cwd=os.path.abspath(pylucene_src_path),
                         filter_stdout=filter_python_develop,
-                        show_stdout=False)
-
-        os.re
-        
-        os.removedirs(src_dir)
+                        show_stdout=True)
+        shutil.rmtree(src_dir)
 
     finally:
         logger.indent -= 2
--- a/web/blinkster/.htaccess.tmpl	Tue Jun 01 10:44:27 2010 +0200
+++ b/web/blinkster/.htaccess.tmpl	Tue Jun 01 19:07:23 2010 +0200
@@ -1,11 +1,12 @@
 SetHandler python-program
-PythonHandler django.core.handlers.modpython
+PythonHandler handler
 SetEnv DJANGO_SETTINGS_MODULE blinkster.settings
 SetEnv PY_USE_XMLPLUS true
+SetEnv VIRTUALENV_ACTIVATE_PATH /Users/ymh/dev/workspace/blinkster/sbin/bvenv/bin/activate_this.py
 PythonInterpreter blinkster
 PythonOption django.root /~ymh/blinkster/blinkster
 PythonDebug on
-PythonPath "['/Users/ymh/Sites/blinkster', '/Users/ymh/Sites/blinkster/lib'] + sys.path"
+PythonPath "['/Users/ymh/dev/workspace/blinkster/sbin/bvenv/bin', '/Users/ymh/Sites/blinkster', '/Users/ymh/Sites/blinkster/lib'] + sys.path"
 Header set Pragma "no-cache"
 Header set Cache-Control "no-cache"
 Header set Expires "-1"
--- a/web/blinkster/__init__.py	Tue Jun 01 10:44:27 2010 +0200
+++ b/web/blinkster/__init__.py	Tue Jun 01 19:07:23 2010 +0200
@@ -1,3 +1,3 @@
-VERSION = (0,10)
+VERSION = (0, 10)
 
 VERSION_STR = unicode(".".join(map(lambda i:"%02d" % (i,), VERSION)))
--- a/web/blinkster/handler.py	Tue Jun 01 10:44:27 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-
-activate_this = '/Users/ymh/dev/workspace/blinkster/sbin/blinkster/bin/activate_this.py'
-execfile(activate_this, dict(__file__=activate_this))
-
-from django.core.handlers.modpython import handler
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/web/blinkster/handler.py.tmpl	Tue Jun 01 19:07:23 2010 +0200
@@ -0,0 +1,10 @@
+
+activate_this = '/Users/ymh/dev/workspace/blinkster/sbin/bvenv/bin/activate_this.py'
+execfile(activate_this, dict(__file__=activate_this))
+
+from django.core.handlers.modpython import handler
+
+#def handler_this(req):
+#    activate_this = req.get_options().get("virtualenv.activate_path")
+#    execfile(activate_this, dict(__file__=activate_this))    
+#    return handler(req)
\ No newline at end of file
--- a/web/blinkster/ldt/__init__.py	Tue Jun 01 10:44:27 2010 +0200
+++ b/web/blinkster/ldt/__init__.py	Tue Jun 01 19:07:23 2010 +0200
@@ -6,9 +6,9 @@
 
 STORE = lucene.SimpleFSDirectory(lucene.File(settings.INDEX_PATH))
 ANALYZER = lucene.PerFieldAnalyzerWrapper(lucene.StandardAnalyzer(lucene.Version.LUCENE_CURRENT))
-ANALYZER.addAnalyzer("tags",lucene.FrenchAnalyzer(lucene.Version.LUCENE_CURRENT))
-ANALYZER.addAnalyzer("title",lucene.FrenchAnalyzer(lucene.Version.LUCENE_CURRENT))
-ANALYZER.addAnalyzer("abstract",lucene.FrenchAnalyzer(lucene.Version.LUCENE_CURRENT))
-ANALYZER.addAnalyzer("all",lucene.FrenchAnalyzer(lucene.Version.LUCENE_CURRENT))
+ANALYZER.addAnalyzer("tags", lucene.FrenchAnalyzer(lucene.Version.LUCENE_CURRENT))
+ANALYZER.addAnalyzer("title", lucene.FrenchAnalyzer(lucene.Version.LUCENE_CURRENT))
+ANALYZER.addAnalyzer("abstract", lucene.FrenchAnalyzer(lucene.Version.LUCENE_CURRENT))
+ANALYZER.addAnalyzer("all", lucene.FrenchAnalyzer(lucene.Version.LUCENE_CURRENT))
 
 
--- a/web/blinkster/ldt/contentindexer.py	Tue Jun 01 10:44:27 2010 +0200
+++ b/web/blinkster/ldt/contentindexer.py	Tue Jun 01 19:07:23 2010 +0200
@@ -17,7 +17,7 @@
 
 class ContentIndexer(object):
         
-        def __init__(self, contentList, writer, decoupage_blackList = settings.DECOUPAGE_BLACKLIST):
+        def __init__(self, contentList, writer, decoupage_blackList=settings.DECOUPAGE_BLACKLIST):
                 self.__contentList = contentList
                 self.__decoupage_blacklist = decoupage_blackList
                 self.__writer = writer
@@ -45,7 +45,7 @@
                 
         def index_content(self, content):
             
-            blinkster.utils.log.debug("Indexing content : "+str(content.iri_id))
+            blinkster.utils.log.debug("Indexing content : " + str(content.iri_id))
             filepath = content.iri_file_path()
             doc = xml.dom.minidom.parse(filepath)
             doc = Ft.Xml.Domlette.ConvertDocument(doc)        
@@ -57,23 +57,23 @@
             res = xml.xpath.Evaluate("/iri/body/ensembles/ensemble", context=con)
 
             for ensemble in res:
-                ensembleId = ensemble.getAttributeNS(None,"id")
+                ensembleId = ensemble.getAttributeNS(None, "id")
                 
                 for decoupageNode in ensemble.childNodes:
-                    blinkster.utils.log.debug("Indexing content decoupage : "+ repr(decoupageNode.nodeType) + " in " + repr(self.decoupage_blacklist))
-                    if decoupageNode.nodeType != xml.dom.Node.ELEMENT_NODE or decoupageNode.tagName != "decoupage"  or decoupageNode.getAttributeNS(None,"id") in self.decoupage_blacklist:
+                    blinkster.utils.log.debug("Indexing content decoupage : " + repr(decoupageNode.nodeType) + " in " + repr(self.decoupage_blacklist))
+                    if decoupageNode.nodeType != xml.dom.Node.ELEMENT_NODE or decoupageNode.tagName != "decoupage"  or decoupageNode.getAttributeNS(None, "id") in self.decoupage_blacklist:
                         continue
                     
-                    decoupId = decoupageNode.getAttributeNS(None,"id")
+                    decoupId = decoupageNode.getAttributeNS(None, "id")
                     res = xml.xpath.Evaluate("elements/element", decoupageNode)
                     for elementNode in res:
                         doc = lucene.Document()
-                        elementId = elementNode.getAttributeNS(None,"id")
-                        tags = elementNode.getAttributeNS(None,"tags")
-                        author = elementNode.getAttributeNS(None,"author")
-                        start_ts = int(elementNode.getAttributeNS(None,"begin"))
-                        duration = int(elementNode.getAttributeNS(None,"dur"))
-                        date_str = elementNode.getAttributeNS(None,"date")
+                        elementId = elementNode.getAttributeNS(None, "id")
+                        tags = elementNode.getAttributeNS(None, "tags")
+                        author = elementNode.getAttributeNS(None, "author")
+                        start_ts = int(elementNode.getAttributeNS(None, "begin"))
+                        duration = int(elementNode.getAttributeNS(None, "dur"))
+                        date_str = elementNode.getAttributeNS(None, "date")
                         
                         if tags is not None:                            
                             tags.replace(",", ";")
@@ -107,18 +107,18 @@
                         doc.add(lucene.Field("abstract", abstract, lucene.Field.Store.NO, lucene.Field.Index.ANALYZED))
                         doc.add(lucene.Field("all", " ".join([tags, title, abstract]), lucene.Field.Store.NO, lucene.Field.Index.ANALYZED))
             
-                        seg = Segment(content = content,
-                                      iri_id = content.iri_id,
-                                      ensemble_id = ensembleId,
-                                      cutting_id = decoupId,
-                                      element_id = elementId,
-                                      tags =  tags,
-                                      title = title,
-                                      abstract = abstract,
-                                      duration = duration,
-                                      author = author,
-                                      start_ts = start_ts,
-                                      date = date_str)
+                        seg = Segment(content=content,
+                                      iri_id=content.iri_id,
+                                      ensemble_id=ensembleId,
+                                      cutting_id=decoupId,
+                                      element_id=elementId,
+                                      tags=tags,
+                                      title=title,
+                                      abstract=abstract,
+                                      duration=duration,
+                                      author=author,
+                                      start_ts=start_ts,
+                                      date=date_str)
                         seg.save()
             
                         self.__writer.addDocument(doc)
@@ -128,7 +128,7 @@
             
 class ProjectIndexer(object):
         
-        def __init__(self, projectList, writer, decoupage_blackList = settings.DECOUPAGE_BLACKLIST):
+        def __init__(self, projectList, writer, decoupage_blackList=settings.DECOUPAGE_BLACKLIST):
                 self.__projectList = projectList
                 self.__decoupage_blacklist = decoupage_blackList
                 self.__writer = writer
@@ -156,7 +156,7 @@
  
         def index_project(self, project):
             
-            blinkster.utils.log.debug("Indexing project : "+str(project.iri_id))
+            blinkster.utils.log.debug("Indexing project : " + str(project.iri_id))
             doc = xml.dom.minidom.parseString(project.ldt)
             doc = Ft.Xml.Domlette.ConvertDocument(doc)        
 
@@ -166,25 +166,25 @@
             res = xml.xpath.Evaluate("/iri/annotations/content", context=con)
 
             for content in res:
-                contentId = content.getAttributeNS(None,"id")
+                contentId = content.getAttributeNS(None, "id")
                 
                 ensembleId = "ens_perso"
                 
                 for decoupageNode in content.childNodes:
-                    blinkster.utils.log.debug("Indexing content decoupage : "+ repr(decoupageNode.nodeType) + " in " + repr(self.decoupage_blacklist))
-                    if decoupageNode.nodeType != xml.dom.Node.ELEMENT_NODE or decoupageNode.tagName != "decoupage"  or decoupageNode.getAttributeNS(None,"id") in self.decoupage_blacklist:
+                    blinkster.utils.log.debug("Indexing content decoupage : " + repr(decoupageNode.nodeType) + " in " + repr(self.decoupage_blacklist))
+                    if decoupageNode.nodeType != xml.dom.Node.ELEMENT_NODE or decoupageNode.tagName != "decoupage"  or decoupageNode.getAttributeNS(None, "id") in self.decoupage_blacklist:
                         continue
                     
-                    decoupId = decoupageNode.getAttributeNS(None,"id")
+                    decoupId = decoupageNode.getAttributeNS(None, "id")
                     res = xml.xpath.Evaluate("elements/element", decoupageNode)
                     for elementNode in res:
                         doc = lucene.Document()
-                        elementId = elementNode.getAttributeNS(None,"id")
-                        tags = elementNode.getAttributeNS(None,"tags")
-                        author = elementNode.getAttributeNS(None,"author")
-                        start_ts = int(elementNode.getAttributeNS(None,"begin"))
-                        duration = int(elementNode.getAttributeNS(None,"dur"))
-                        date_str = elementNode.getAttributeNS(None,"date")
+                        elementId = elementNode.getAttributeNS(None, "id")
+                        tags = elementNode.getAttributeNS(None, "tags")
+                        author = elementNode.getAttributeNS(None, "author")
+                        start_ts = int(elementNode.getAttributeNS(None, "begin"))
+                        duration = int(elementNode.getAttributeNS(None, "dur"))
+                        date_str = elementNode.getAttributeNS(None, "date")
                         
                         if tags is not None:                            
                             tags.replace(",", ";")
@@ -221,21 +221,21 @@
                         doc.add(lucene.Field("all", " ".join([tags, title, abstract]), lucene.Field.Store.NO, lucene.Field.Index.ANALYZED))
             
                         try:
-                            content = Content.objects.get(iri_id = contentId)
-                            seg = Segment( project_obj = project,
-                                      content = content,
-                                      project_id = project.ldt_id,
-                                      iri_id = contentId,
-                                      ensemble_id = ensembleId,
-                                      cutting_id = decoupId,
-                                      element_id = elementId,
-                                      tags =  tags,
-                                      title = title,
-                                      abstract = abstract,
-                                      duration = duration,
-                                      author = author,
-                                      start_ts = start_ts,
-                                      date = date_str)
+                            content = Content.objects.get(iri_id=contentId)
+                            seg = Segment(project_obj=project,
+                                      content=content,
+                                      project_id=project.ldt_id,
+                                      iri_id=contentId,
+                                      ensemble_id=ensembleId,
+                                      cutting_id=decoupId,
+                                      element_id=elementId,
+                                      tags=tags,
+                                      title=title,
+                                      abstract=abstract,
+                                      duration=duration,
+                                      author=author,
+                                      start_ts=start_ts,
+                                      date=date_str)
                             seg.save()
                         except:
                             blinkster.utils.log.error("unable to store segment")
--- a/web/blinkster/ldt/fileimport.py	Tue Jun 01 10:44:27 2010 +0200
+++ b/web/blinkster/ldt/fileimport.py	Tue Jun 01 19:07:23 2010 +0200
@@ -23,7 +23,7 @@
 class IriInfo(object):
 
     
-    def __init__(self, id, basepath, order, titledesc, decoupage_blacklist = settings.DECOUPAGE_BLACKLIST):
+    def __init__(self, id, basepath, order, titledesc, decoupage_blacklist=settings.DECOUPAGE_BLACKLIST):
         self.id = id
         self.basepath = basepath
         self.order = order
@@ -55,18 +55,18 @@
         res = xml.xpath.Evaluate("/iri/head/meta[@name='title']/@content", context=con)
         self.title = res[0].value
         
-        res = xml.xpath.Evaluate("/iri/body/ensembles",context=con)
+        res = xml.xpath.Evaluate("/iri/body/ensembles", context=con)
         ensemblesnode = res[0]
 
         if self.annotations is not None:
             newensemble = doc.createElement('ensemble')
-            self.ensembleId = self.id+"_"+str(uuid.uuid1())
-            newensemble.setAttributeNS(None,'id',self.ensembleId)
+            self.ensembleId = self.id + "_" + str(uuid.uuid1())
+            newensemble.setAttributeNS(None, 'id', self.ensembleId)
         
-            newensemble.setAttributeNS(None,'title', self.annotations.getAttributeNS(None,'title'))
-            newensemble.setAttributeNS(None,'author', self.annotations.getAttribute('author'))
-            newensemble.setAttributeNS(None,'date', self.annotations.getAttribute('date'))
-            newensemble.setAttributeNS(None,'abstract', self.annotations.getAttribute('abstract'))
+            newensemble.setAttributeNS(None, 'title', self.annotations.getAttributeNS(None, 'title'))
+            newensemble.setAttributeNS(None, 'author', self.annotations.getAttribute('author'))
+            newensemble.setAttributeNS(None, 'date', self.annotations.getAttribute('date'))
+            newensemble.setAttributeNS(None, 'abstract', self.annotations.getAttribute('abstract'))
             
             decoupageNode = None
             for node in self.annotations.childNodes:
@@ -87,18 +87,18 @@
                     ensemble = node
                     break
             if ensemble is not None:
-                self.ensembleId = ensemble.getAttributeNS(None,u"id")
+                self.ensembleId = ensemble.getAttributeNS(None, u"id")
                 decoupageNode = None
                 for node in ensemble.childNodes:
                     if node.nodeType == xml.dom.Node.ELEMENT_NODE and node.tagName == "decoupage":
                         decoupageNode = node
                         break
                 if not decoupageNode is None:
-                    self.decoupageId = decoupageNode.getAttributeNS(None,u"id")
+                    self.decoupageId = decoupageNode.getAttributeNS(None, u"id")
                 
         
         res = xml.xpath.Evaluate("/iri/body/medias/media[@id='video']/video", context=con)
-        src_video = res[0].getAttributeNS(None,'src')
+        src_video = res[0].getAttributeNS(None, 'src')
         self.videourl = os.path.basename(src_video)
         self.duration = res[0].getAttributeNS(None, 'dur')
         
@@ -117,8 +117,8 @@
 
 
     def saveContent(self):
-        blinkster.utils.log.debug("ID of object to create : "+str(self.id))
-        content, self.created = Content.objects.get_or_create(iri_id=self.id, defaults = { 'iri' : self.id + u"/" + os.path.basename(self.src), 'title':self.title, 'description':self.desc, })#'decoupage_id': self.decoupageId, 'ensemble_id': self.ensembleId});
+        blinkster.utils.log.debug("ID of object to create : " + str(self.id))
+        content, self.created = Content.objects.get_or_create(iri_id=self.id, defaults={ 'iri' : self.id + u"/" + os.path.basename(self.src), 'title':self.title, 'description':self.desc, })#'decoupage_id': self.decoupageId, 'ensemble_id': self.ensembleId});
         if not self.created:
             content.iri = self.id + u"/" + os.path.basename(self.src)
             content.title = self.title
@@ -130,7 +130,7 @@
         self.content = content
             
     def indexDecoupage(self, writer):
-        indexer = ContentIndexer([self.content],writer, settings.DECOUPAGE_BLACKLIST)
+        indexer = ContentIndexer([self.content], writer, settings.DECOUPAGE_BLACKLIST)
         indexer.index_all()
             
     def process(self, writer):
@@ -198,7 +198,7 @@
 class FileImport(BaseFileImport):
 
     def __init__(self, filepath, author):
-        BaseFileImport.__init__(self,filepath,author)
+        BaseFileImport.__init__(self, filepath, author)
         self.__checkExistingMedia = False
         
     def checkExistingMedia(): #@NoSelf
@@ -233,14 +233,14 @@
         result = xml.xpath.Evaluate("/iri/project", context=con)
         for pnode in result:
             #author = pnode.attributes["user"].value
-            if pnode.hasAttributeNS(None,"user"):
+            if pnode.hasAttributeNS(None, "user"):
                 self.author = unicode(pnode.getAttributeNS(None, "user"))
                 break 
 
         result = xml.xpath.Evaluate("/iri/medias/media", context=con)
         
         for i, medianode in  enumerate(result):
-            id = medianode.getAttributeNS(None,'id')
+            id = medianode.getAttributeNS(None, 'id')
             blinkster.utils.log.debug("FIRST ID : " + str(id))
             if self.checkExistingMedia:
                 try:
@@ -254,17 +254,17 @@
                 if not (contents.has_key(id)):
                     blinkster.utils.log.debug("CREATE IRI INFO ID : " + str(id))
                     contents[id] = IriInfo(id, os.path.dirname(ldtpath), i, "")
-                contents[id].src = medianode.getAttributeNS(None,'src')
+                contents[id].src = medianode.getAttributeNS(None, 'src')
         
         result = xml.xpath.Evaluate("/iri/annotations/content", context=con)
 
         blinkster.utils.log.debug("content xpath result : " + str(len(result)))        
         for contentnode in result:
-            id = contentnode.getAttributeNS(None,'id')
+            id = contentnode.getAttributeNS(None, 'id')
             blinkster.utils.log.debug("ID : " + str(id))
             if contents.has_key(id):
                 if self.author:
-                    contentnode.setAttributeNS(None,"author", unicode(self.author))
+                    contentnode.setAttributeNS(None, "author", unicode(self.author))
                 contents[id].annotations = contentnode
         
         #go throught values
@@ -293,7 +293,7 @@
             blinkster.utils.log.debug(os.listdir(self.__tempdir))
             foldersToProcess = [self.__tempdir]
             while len(foldersToProcess):
-                blinkster.utils.log.debug("folder stack length : "+ str(len(foldersToProcess)))
+                blinkster.utils.log.debug("folder stack length : " + str(len(foldersToProcess)))
                 currentFolder = foldersToProcess.pop()
                 for entry in os.listdir(currentFolder):
                     if entry in settings.ZIP_BLACKLIST:
@@ -341,7 +341,7 @@
         for i, medianode in  enumerate(result):
             id = medianode.attributes['id'].value
             blinkster.utils.log.debug("FIRST ID at " + str(i) + " : " + str(id))
-            content = Content.objects.get(iri_id = id)
+            content = Content.objects.get(iri_id=id)
             self.contents.append(content)
             
             medianode.setAttribute('src', content.iri_url_template())
@@ -356,7 +356,7 @@
         authors = [self.author]
         contents = self.contents         
         
-        ldtproject = LdtProject(ldt_id = ldt_id, ldt=ldt)
+        ldtproject = LdtProject(ldt_id=ldt_id, ldt=ldt)
         ldtproject.save()
         idldt = ldtproject.id
         blinkster.utils.log.debug("ProjectFileImport.processFile ID : " + str(idldt))
@@ -373,7 +373,7 @@
 class ZipProjectFileImport(FileImport):
     
     def __init__(self, filepath, author):
-        FileImport.__init__(self,filepath,author)
+        FileImport.__init__(self, filepath, author)
         self.checkExistingMedia = True
     
     def processLdt(self, ldtPath):
--- a/web/blinkster/ldt/forms.py	Tue Jun 01 10:44:27 2010 +0200
+++ b/web/blinkster/ldt/forms.py	Tue Jun 01 19:07:23 2010 +0200
@@ -8,7 +8,7 @@
 
 class SearchForm(forms.Form):
     search = forms.CharField()
-    field = forms.ChoiceField([(u"all",u"tous"),(u"title",u"titre"),(u"abstract",u"résumé"),(u"tags",u"tags")])
+    field = forms.ChoiceField([(u"all", u"tous"), (u"title", u"titre"), (u"abstract", u"résumé"), (u"tags", u"tags")])
 
 class LdtForm(forms.Form):
     contents = forms.ModelMultipleChoiceField(Content.objects.all())
--- a/web/blinkster/ldt/models.py	Tue Jun 01 10:44:27 2010 +0200
+++ b/web/blinkster/ldt/models.py	Tue Jun 01 19:07:23 2010 +0200
@@ -13,8 +13,8 @@
 
     handle = models.CharField(max_length=512, unique=True, blank=True, null=True)
     email = models.EmailField(unique=False, blank=True, null=True)
-    firstname = models.CharField(max_length=512,blank=True, null=True)
-    lastname = models.CharField(max_length=512,blank=True, null=True)
+    firstname = models.CharField(max_length=512, blank=True, null=True)
+    lastname = models.CharField(max_length=512, blank=True, null=True)
     
     def __unicode__(self):
         return unicode(self.id) + " - " + self.handle + ", " + self.email + ", " + self.firstname + " " + self.lastname
@@ -22,7 +22,7 @@
 class Content(models.Model):
 
     def uploadTo(self, filename):
-        return "media/ldt/"+self.iri_id+"/"+filename
+        return "media/ldt/" + self.iri_id + "/" + filename
 
     iri_id = models.CharField(max_length=1024, unique=True)
     iri = models.FileField(upload_to=uploadTo, null=True)
@@ -51,13 +51,13 @@
         writer.flush()
     
     def iri_file_path(self):
-        return os.path.join(os.path.join(os.path.join(os.path.join(settings.MEDIA_ROOT,"media"),"ldt"), self.iri_id), os.path.basename(self.iri.path))
+        return os.path.join(os.path.join(os.path.join(os.path.join(settings.MEDIA_ROOT, "media"), "ldt"), self.iri_id), os.path.basename(self.iri.path))
 
     def iri_url(self, web_url=""):
-        return unicode(web_url) + unicode(settings.MEDIA_URL)+u"media/ldt/"+unicode(self.iri_id)+"/"+os.path.basename(self.iri.path)
+        return unicode(web_url) + unicode(settings.MEDIA_URL) + u"media/ldt/" + unicode(self.iri_id) + "/" + os.path.basename(self.iri.path)
 
     def iri_url_template(self):
-            return "${web_url}${media_url}media/ldt/" + unicode(self.iri_id) + "/"+os.path.basename(self.iri.path)
+            return "${web_url}${media_url}media/ldt/" + unicode(self.iri_id) + "/" + os.path.basename(self.iri.path)
     
     def __unicode__(self):
         return str(self.id) + ": " + self.iri_id
@@ -79,12 +79,12 @@
     
     project_obj = models.ForeignKey(LdtProject, null=True)
     content = models.ForeignKey(Content)
-    project_id = models.CharField(max_length=1024, unique=False, blank = True, null=True)
+    project_id = models.CharField(max_length=1024, unique=False, blank=True, null=True)
     iri_id = models.CharField(max_length=1024, unique=False)
     ensemble_id = models.CharField(max_length=1024, unique=False)
     cutting_id = models.CharField(max_length=1024, unique=False)    
     element_id = models.CharField(max_length=1024, unique=False)
-    tags =  models.CharField(max_length=2048, unique=False, null=True, blank=True)  
+    tags = models.CharField(max_length=2048, unique=False, null=True, blank=True)  
     title = models.CharField(max_length=2048, unique=False, null=True, blank=True)
     duration = models.IntegerField(null=True)
     start_ts = models.IntegerField(null=True)
@@ -96,7 +96,7 @@
         return "/".join((unicode(self.project_id), unicode(self.iri_id), unicode(self.ensemble_id), unicode(self.cutting_id), unicode(self.element_id)))
     
     class Meta:
-        unique_together = (('project_id','iri_id','ensemble_id','cutting_id','element_id'),)
+        unique_together = (('project_id', 'iri_id', 'ensemble_id', 'cutting_id', 'element_id'),)
     
     
 admin.site.register(Content)
--- a/web/blinkster/ldt/utils.py	Tue Jun 01 10:44:27 2010 +0200
+++ b/web/blinkster/ldt/utils.py	Tue Jun 01 19:07:23 2010 +0200
@@ -21,10 +21,10 @@
         queryParser = lucene.QueryParser(lucene.Version.LUCENE_30, field, lucene.FrenchAnalyzer(lucene.Version.LUCENE_30))
         queryParser.setDefaultOperator(lucene.QueryParser.Operator.AND)
         queryObj = queryParser.parse(query)
-        hits = indexSearcher.search(queryObj,50)
+        hits = indexSearcher.search(queryObj, 50)
         for hit in hits.scoreDocs:
             doc = indexSearcher.doc(hit.doc)
-            res.append({"iri_id":doc.get("iri_id"),"ensemble_id":doc.get("ensemble_id"),"decoupage_id":doc.get("decoupage_id"), "element_id":doc.get("element_id")})
+            res.append({"iri_id":doc.get("iri_id"), "ensemble_id":doc.get("ensemble_id"), "decoupage_id":doc.get("decoupage_id"), "element_id":doc.get("element_id")})
         indexSearcher.close()
         return res
 
@@ -34,19 +34,19 @@
 
 class LdtUtils(object):
     
-    def generateLdt(self, contentList, file, title = u"", author=u"IRI Web", web_url=u"", media_url=""):
-        writer = MarkupWriter(file, indent = u"yes")
+    def generateLdt(self, contentList, file, title=u"", author=u"IRI Web", web_url=u"", media_url=""):
+        writer = MarkupWriter(file, indent=u"yes")
         writer.startDocument()
         writer.startElement(u"iri")
         writer.simpleElement(u"project", attributes={u"id":unicode(str(uuid.uuid1())), u"title":unicode(title) , u"user":author, u"abstract":u""})
         writer.startElement(u"medias")
         for content in contentList:
-            writer.simpleElement(u"media", attributes={u"id":content.iri_id,u"src":content.iri_url(web_url),u"video":unicode(media_url)+unicode(blinkster.settings.STREAM_URL),u"pict":u"",u"extra":u""})
+            writer.simpleElement(u"media", attributes={u"id":content.iri_id, u"src":content.iri_url(web_url), u"video":unicode(media_url) + unicode(blinkster.settings.STREAM_URL), u"pict":u"", u"extra":u""})
         writer.endElement(u"medias")
         writer.simpleElement(u"annotations")
         writer.startElement(u"displays")
         if len(contentList) > 0:
-            writer.startElement(u"display", attributes={u"id":u"0",u"title":u"generated",u"idsel":contentList[0].iri_id,u"tc":u"0"})
+            writer.startElement(u"display", attributes={u"id":u"0", u"title":u"generated", u"idsel":contentList[0].iri_id, u"tc":u"0"})
             for content in contentList:
                 writer.startElement(u"content", attributes={u"id":content.iri_id})
                 doc = xml.dom.minidom.parse(content.iri_file_path())
@@ -55,7 +55,7 @@
                 for decoupagenode in res:
                     decoupage_id = decoupagenode.getAttribute(u"id")
                     ensemble_id = decoupagenode.parentNode.getAttribute(u"id")
-                    writer.simpleElement(u"decoupage", attributes={u"id":decoupage_id,u"idens":ensemble_id})
+                    writer.simpleElement(u"decoupage", attributes={u"id":decoupage_id, u"idens":ensemble_id})
                 writer.endElement(u"content")
             writer.endElement(u"display")
         writer.endElement(u"displays")
@@ -76,10 +76,10 @@
     
         elementfile = doc.createElement('file')
             
-        elementfile.setAttribute('src',blinkster.settings.WEB_URL + django.core.urlresolvers.reverse(method, args=url))
+        elementfile.setAttribute('src', blinkster.settings.WEB_URL + django.core.urlresolvers.reverse(method, args=url))
         elementfile.setAttribute('display', '1')
         if(search):
-            elementfile.setAttribute("segsel",blinkster.settings.WEB_URL + django.core.urlresolvers.reverse(search, args=url))
+            elementfile.setAttribute("segsel", blinkster.settings.WEB_URL + django.core.urlresolvers.reverse(search, args=url))
     
     
         #/*chemin video : tant que le serveur de media n'est pas up, */
--- a/web/blinkster/ldt/views.py	Tue Jun 01 10:44:27 2010 +0200
+++ b/web/blinkster/ldt/views.py	Tue Jun 01 19:07:23 2010 +0200
@@ -30,14 +30,14 @@
     urlStr = settings.WEB_URL + django.core.urlresolvers.reverse("blinkster.ldt.views.init", args=['ldt', url])
     language_code = request.LANGUAGE_CODE[:2]
     
-    return render_to_response('ldt/init_ldt.html', {'MEDIA_URL': settings.MEDIA_URL, 'colorurl': settings.MEDIA_URL+'swf/ldt/pkg/color.xml', 'i18nurl': settings.MEDIA_URL+'swf/ldt/pkg/i18n', 'language': language_code, 'baseurl': settings.MEDIA_URL+'swf/ldt/', 'url': urlStr}, context_instance=RequestContext(request))
+    return render_to_response('ldt/init_ldt.html', {'MEDIA_URL': settings.MEDIA_URL, 'colorurl': settings.MEDIA_URL + 'swf/ldt/pkg/color.xml', 'i18nurl': settings.MEDIA_URL + 'swf/ldt/pkg/i18n', 'language': language_code, 'baseurl': settings.MEDIA_URL + 'swf/ldt/', 'url': urlStr}, context_instance=RequestContext(request))
 
 def indexProject(request, id):
 
     urlStr = settings.WEB_URL + django.core.urlresolvers.reverse("blinkster.ldt.views.init", args=['ldtProject', id])
     language_code = request.LANGUAGE_CODE[:2]
     
-    return render_to_response('ldt/init_ldt.html', {'MEDIA_URL': settings.MEDIA_URL, 'colorurl': settings.MEDIA_URL+'swf/ldt/pkg/color.xml', 'i18nurl': settings.MEDIA_URL+'swf/ldt/pkg/i18n', 'language': language_code, 'baseurl': settings.MEDIA_URL+'swf/ldt/', 'url': urlStr}, context_instance=RequestContext(request))
+    return render_to_response('ldt/init_ldt.html', {'MEDIA_URL': settings.MEDIA_URL, 'colorurl': settings.MEDIA_URL + 'swf/ldt/pkg/color.xml', 'i18nurl': settings.MEDIA_URL + 'swf/ldt/pkg/i18n', 'language': language_code, 'baseurl': settings.MEDIA_URL + 'swf/ldt/', 'url': urlStr}, context_instance=RequestContext(request))
         
 
 
@@ -54,19 +54,19 @@
     #queryStr = django.utils.http.urlquote_plus(form.search)
     
     url = settings.WEB_URL + django.core.urlresolvers.reverse("blinkster.ldt.views.searchInit", args=[field, queryStr])
-    return render_to_response('ldt/init_ldt.html', {'MEDIA_URL': settings.MEDIA_URL, 'colorurl': settings.MEDIA_URL+'swf/ldt/pkg/color.xml', 'i18nurl': settings.MEDIA_URL+'swf/ldt/pkg/i18n', 'language': language_code, 'baseurl': settings.MEDIA_URL+'swf/ldt/', 'url': url}, context_instance=RequestContext(request))
+    return render_to_response('ldt/init_ldt.html', {'MEDIA_URL': settings.MEDIA_URL, 'colorurl': settings.MEDIA_URL + 'swf/ldt/pkg/color.xml', 'i18nurl': settings.MEDIA_URL + 'swf/ldt/pkg/i18n', 'language': language_code, 'baseurl': settings.MEDIA_URL + 'swf/ldt/', 'url': url}, context_instance=RequestContext(request))
 
 def searchIndexGet(request, field, query):
 
     language_code = request.LANGUAGE_CODE[:2]
     url = settings.WEB_URL + django.core.urlresolvers.reverse("blinkster.ldt.views.searchInit", args=[field, query])
-    return render_to_response('ldt/init_ldt.html', {'MEDIA_URL': settings.MEDIA_URL, 'colorurl': settings.MEDIA_URL+'swf/ldt/pkg/color.xml', 'i18nurl': settings.MEDIA_URL+'swf/ldt/pkg/i18n', 'language': language_code, 'baseurl': settings.MEDIA_URL+'swf/ldt/', 'url': url}, context_instance=RequestContext(request))
+    return render_to_response('ldt/init_ldt.html', {'MEDIA_URL': settings.MEDIA_URL, 'colorurl': settings.MEDIA_URL + 'swf/ldt/pkg/color.xml', 'i18nurl': settings.MEDIA_URL + 'swf/ldt/pkg/i18n', 'language': language_code, 'baseurl': settings.MEDIA_URL + 'swf/ldt/', 'url': url}, context_instance=RequestContext(request))
 
 def searchInit(request, field, query):
     
     ldtgen = blinkster.ldt.utils.LdtUtils()
     
-    doc = ldtgen.generateInit([field,query], 'blinkster.ldt.views.searchLdt', 'blinkster.ldt.views.searchSegments')
+    doc = ldtgen.generateInit([field, query], 'blinkster.ldt.views.searchLdt', 'blinkster.ldt.views.searchSegments')
     
     resp = HttpResponse(mimetype="text/xml")
     xml.dom.ext.PrettyPrint(doc, resp)
@@ -77,7 +77,7 @@
 
     ldtgen = blinkster.ldt.utils.LdtUtils()
     
-    doc = ldtgen.generateInit([url], 'blinkster.ldt.views.'+method, None)
+    doc = ldtgen.generateInit([url], 'blinkster.ldt.views.' + method, None)
     
     resp = HttpResponse(mimetype="text/xml")
     xml.dom.ext.PrettyPrint(doc, resp)
@@ -95,7 +95,7 @@
     contentList = blinkster.ldt.models.Content.objects.filter(iri_id=url)
     
     ldtgen = blinkster.ldt.utils.LdtUtils()
-    ldtgen.generateLdt(contentList, file=resp, title = contentList[0].title)
+    ldtgen.generateLdt(contentList, file=resp, title=contentList[0].title)
     
     return resp
     
@@ -104,7 +104,7 @@
     
     project = blinkster.ldt.models.LdtProject.objects.get(id=id)
     template = Template(project.ldt)
-    resp.write(template.safe_substitute({'web_url':settings.WEB_URL,'media_url':settings.MEDIA_URL, 'stream_url': settings.STREAM_URL}))
+    resp.write(template.safe_substitute({'web_url':settings.WEB_URL, 'media_url':settings.MEDIA_URL, 'stream_url': settings.STREAM_URL}))
     
     return resp
     
@@ -113,15 +113,15 @@
 
 def importFile(request):
     form = LdtImportForm() 
-    return render_to_response('ldt/upload_form.html',{'form': form} , context_instance=RequestContext(request))
+    return render_to_response('ldt/upload_form.html', {'form': form} , context_instance=RequestContext(request))
 
 def importProjectFile(request):
     form = LdtProjectImportForm()
-    return render_to_response('ldt/upload_project_form.html',{'form': form}, context_instance=RequestContext(request))
+    return render_to_response('ldt/upload_project_form.html', {'form': form}, context_instance=RequestContext(request))
 
 def searchForm(request):
     form = SearchForm()
-    return render_to_response('ldt/search_form.html',{'form': form} , context_instance=RequestContext(request))
+    return render_to_response('ldt/search_form.html', {'form': form} , context_instance=RequestContext(request))
 
 
 def uploadFile(request):
@@ -166,7 +166,7 @@
 
         args = {'message': "Error when importing : invalid form", 'form': importForm}
         
-    return render_to_response('ldt/upload_project_form.html',args, context_instance=RequestContext(request))
+    return render_to_response('ldt/upload_project_form.html', args, context_instance=RequestContext(request))
 
 
 def searchLdt(request, field, query, edition=None):
@@ -175,7 +175,7 @@
     resp = HttpResponse(mimetype="text/xml")
     queryStr = ""
 
-    if query and len(query)>0:        
+    if query and len(query) > 0:        
         queryStr = base64.urlsafe_b64decode(query.encode("ascii")).decode("utf8")
         #queryStr = base64.urlsafe_b64decode(query.trim("="))
         searcher = blinkster.ldt.utils.LdtSearch()
@@ -194,14 +194,14 @@
 
             
     ldtgen = blinkster.ldt.utils.LdtUtils()
-    ldtgen.generateLdt(contentList, file=resp, title = u"Recherche : " + queryStr)
+    ldtgen.generateLdt(contentList, file=resp, title=u"Recherche : " + queryStr)
     
     return resp
 
 
 def searchSegments(request, field, query, edition=None):
     
-    if query and len(query)>0:
+    if query and len(query) > 0:
         searcher = blinkster.ldt.utils.LdtSearch()
         
         queryStr = base64.urlsafe_b64decode(query.encode("ascii")).decode("utf8")
@@ -244,14 +244,14 @@
         contentList = map(lambda id: rawContentList[id], ids)
         
         ldtgen = blinkster.ldt.utils.LdtUtils()
-        ldtgen.generateLdt(contentList, file=resp, author=user, title = "ENMI %s" % edition, web_url=settings.WEB_URL, media_url=settings.MEDIA_BASE_URL)
+        ldtgen.generateLdt(contentList, file=resp, author=user, title="ENMI %s" % edition, web_url=settings.WEB_URL, media_url=settings.MEDIA_BASE_URL)
     
         return resp
 
 
 def exportForm(request):
     form = LdtForm()
-    return render_to_response('ldt/export_form.html',{'form': form} , context_instance=RequestContext(request))
+    return render_to_response('ldt/export_form.html', {'form': form} , context_instance=RequestContext(request))
 
 def reindex(request):
     
@@ -263,7 +263,7 @@
                 writer = lucene.IndexWriter(STORE, ANALYZER, True, lucene.IndexWriter.MaxFieldLength.UNLIMITED)
                 writer.setMaxFieldLength(1048576)
                 contentList = form.cleaned_data["contents"]
-                indexer = ContentIndexer(contentList,writer)
+                indexer = ContentIndexer(contentList, writer)
                 indexer.index_all()
     
                 writer.close()
@@ -283,18 +283,18 @@
     
     resp = HttpResponse(mimetype="text/xml")
     
-    writer = MarkupWriter(resp, indent = u"yes")
+    writer = MarkupWriter(resp, indent=u"yes")
     writer.startDocument()
     writer.startElement(u"iri", attributes={u"version": blinkster.VERSION_STR})
     writer.startElement(u"projects")
     
     for project in projects:
-            writer.startElement(u"project", attributes={"id":unicode(project.id), "url":unicode(settings.WEB_URL + django.core.urlresolvers.reverse('blinkster.ldt.views.indexProject',args=[project.id]))})
+            writer.startElement(u"project", attributes={"id":unicode(project.id), "url":unicode(settings.WEB_URL + django.core.urlresolvers.reverse('blinkster.ldt.views.indexProject', args=[project.id]))})
             writer.startElement(u"authors")
             for author in project.authors.all():
                 writer.startElement(u"author")
                 writer.simpleElement(u"handle", content=unicode(author.handle))
-                writer.simpleElement(u"firstname", content= unicode(author.firstname))
+                writer.simpleElement(u"firstname", content=unicode(author.firstname))
                 writer.simpleElement(u"lastname", content=unicode(author.lastname))
                 writer.simpleElement(u"email", content=unicode(author.email))
                 writer.endElement(u"author")
--- a/web/blinkster/models.py	Tue Jun 01 10:44:27 2010 +0200
+++ b/web/blinkster/models.py	Tue Jun 01 19:07:23 2010 +0200
@@ -50,7 +50,7 @@
         res["loc"] = {}
         if self.loc:
             loc_array = self.loc.split(",")
-            res["loc"] = { "type" : "Point", "coordinates": [float(loc_array[0]),float(loc_array[1])] }
+            res["loc"] = { "type" : "Point", "coordinates": [float(loc_array[0]), float(loc_array[1])] }
         
         res["loc_radius"] = self.loc_radius
         
@@ -58,7 +58,7 @@
         
         if self.photos:
             for photo in self.photos.photos.all():
-                res["photos"].append({"title":photo.title,"url":settings.WEB_URL.strip("/")+photo.image.url})
+                res["photos"].append({"title":photo.title, "url":settings.WEB_URL.strip("/") + photo.image.url})
 
         return res
 
@@ -67,7 +67,7 @@
 class Roi(Ioi):
         
     def __unicode__(self):
-        return "%s : %s" % (unicode(self.pk),unicode(self.title))
+        return "%s : %s" % (unicode(self.pk), unicode(self.title))
         
     
 class Poi(Ioi):
@@ -84,7 +84,7 @@
         return res
 
     def __unicode__(self):
-        return "%s : %s" % (unicode(self.pk),unicode(self.title))
+        return "%s : %s" % (unicode(self.pk), unicode(self.title))
 
 
 
--- a/web/blinkster/settings.py	Tue Jun 01 10:44:27 2010 +0200
+++ b/web/blinkster/settings.py	Tue Jun 01 19:07:23 2010 +0200
@@ -74,7 +74,7 @@
     # Always use forward slashes, even on Windows.
     # Don't forget to use absolute paths, not relative paths.
     os.path.join(BASE_DIR, "templates"),
-    os.path.join(BASE_DIR,"..","lib", "photologue", "templates"),
+    os.path.join(BASE_DIR, "..", "lib", "photologue", "templates"),
 )
 
 INSTALLED_APPS = (
--- a/web/blinkster/translation.py	Tue Jun 01 10:44:27 2010 +0200
+++ b/web/blinkster/translation.py	Tue Jun 01 19:07:23 2010 +0200
@@ -1,5 +1,5 @@
 from modeltranslation.translator import translator, TranslationOptions
-from blinkster.models import Roi,Poi
+from blinkster.models import Roi, Poi
 
 class RoiTranslationOption(TranslationOptions):
     fields = ('title', 'short_title', 'description',)
--- a/web/blinkster/urls.py	Tue Jun 01 10:44:27 2010 +0200
+++ b/web/blinkster/urls.py	Tue Jun 01 19:07:23 2010 +0200
@@ -42,8 +42,8 @@
     (r'^poi/list/(?P<roi_sid>.*)/$', 'blinkster.views.poi_list'),
     (r'^ldt/segment/detail/(?P<iri_id>.*)/(?P<ensemble_id>.*)/(?P<cutting_id>.*)/(?P<element_id>.*)/$', 'blinkster.views.segment_detail'),
     (r'^ldt/segment/playlist/(?P<iri_id>.*)/(?P<ensemble_id>.*)/(?P<cutting_id>.*)/(?P<element_id>.*)/$', 'blinkster.views.segment_ts_playlist'),
-    (r'^ldt/segment/search/$','blinkster.views.segment_search_post'),
-    (r'^ldt/segment/search/(?P<field>tags|title|abstract|all)/(?P<operator>or|and)/(?P<query>.*)/$','blinkster.views.segment_search_get'),
+    (r'^ldt/segment/search/$', 'blinkster.views.segment_search_post'),
+    (r'^ldt/segment/search/(?P<field>tags|title|abstract|all)/(?P<operator>or|and)/(?P<query>.*)/$', 'blinkster.views.segment_search_get'),
     (r'^photologue/', include('photologue.urls')),
     
 )
--- a/web/blinkster/utils/__init__.py	Tue Jun 01 10:44:27 2010 +0200
+++ b/web/blinkster/utils/__init__.py	Tue Jun 01 19:07:23 2010 +0200
@@ -0,0 +1,1 @@
+
--- a/web/blinkster/utils/log.py	Tue Jun 01 10:44:27 2010 +0200
+++ b/web/blinkster/utils/log.py	Tue Jun 01 19:07:23 2010 +0200
@@ -30,7 +30,7 @@
         def __init__(self):
             self.__logger = logging.getLogger("django")
             hdlr = logging.FileHandler(settings.LOG_FILE)
-            formatter = logging.Formatter('[%(asctime)s]%(levelname)-8s"%(message)s"','%Y-%m-%d %a %H:%M:%S') 
+            formatter = logging.Formatter('[%(asctime)s]%(levelname)-8s"%(message)s"', '%Y-%m-%d %a %H:%M:%S') 
             hdlr.setFormatter(formatter)
             self.__logger.addHandler(hdlr)
             self.__logger.setLevel(settings.LOG_LEVEL)
--- a/web/blinkster/utils/xml.py	Tue Jun 01 10:44:27 2010 +0200
+++ b/web/blinkster/utils/xml.py	Tue Jun 01 19:07:23 2010 +0200
@@ -4,4 +4,4 @@
 	for node in nodelist:
 		if node.nodeType == node.TEXT_NODE:
 			rc = rc + node.data
-	return rc
\ No newline at end of file
+	return rc
--- a/web/blinkster/utils/zipfileext.py	Tue Jun 01 10:44:27 2010 +0200
+++ b/web/blinkster/utils/zipfileext.py	Tue Jun 01 19:07:23 2010 +0200
@@ -6,9 +6,9 @@
             os.mkdir(dir, 0777)
         for name in self.namelist():
             if name.endswith('/'):
-                os.mkdir(os.path.join(dir,name))
+                os.mkdir(os.path.join(dir, name))
             else:
-                outfile = open(os.path.join(dir,name), 'wb')
+                outfile = open(os.path.join(dir, name), 'wb')
                 outfile.write(self.read(name))
                 outfile.close()