Merge with 2a162639d2f86db12208b12c0e68f5edfabfebd6
authorcavaliet
Fri, 19 Aug 2011 11:31:57 +0200
changeset 147 a9bddd86aa25
parent 146 e2d3fa7aad7c (current diff)
parent 144 2a162639d2f8 (diff)
child 148 250bc62f2ead
Merge with 2a162639d2f86db12208b12c0e68f5edfabfebd6
--- a/.hgtags	Thu Aug 18 17:00:31 2011 +0200
+++ b/.hgtags	Fri Aug 19 11:31:57 2011 +0200
@@ -21,3 +21,4 @@
 3a17d9717dfe4ee08bda8507e0309ebf2a2a5bf3 V00.14
 01f6e48255f7501febec8c132308243fb36a476d V00.03.03
 9c258de524ef39d3861d9c4b83260a4d7417bda8 V00.15
+b31c24c70fbc553c43dbbb9f2ed9113e3a5961c2 V00.16
--- a/src/ldt/ldt/__init__.py	Thu Aug 18 17:00:31 2011 +0200
+++ b/src/ldt/ldt/__init__.py	Fri Aug 19 11:31:57 2011 +0200
@@ -1,4 +1,4 @@
-VERSION = (0, 15, 0, "final", 0)
+VERSION = (0, 16, 0, "final", 0)
 
 
 def get_version():
--- a/src/ldt/ldt/indexation/__init__.py	Thu Aug 18 17:00:31 2011 +0200
+++ b/src/ldt/ldt/indexation/__init__.py	Fri Aug 19 11:31:57 2011 +0200
@@ -10,9 +10,9 @@
 ANALYZER.addAnalyzer("abstract", lucene.FrenchAnalyzer(lucene.Version.LUCENE_CURRENT))
 ANALYZER.addAnalyzer("all", lucene.FrenchAnalyzer(lucene.Version.LUCENE_CURRENT))
 
-def get_writer():
+def get_writer(new=False):
     lucene.getVMEnv().attachCurrentThread()
-    return lucene.IndexWriter(STORE, ANALYZER, False, lucene.IndexWriter.MaxFieldLength.UNLIMITED)
+    return lucene.IndexWriter(STORE, ANALYZER, new, lucene.IndexWriter.MaxFieldLength.UNLIMITED)
 
 def get_searcher():
     lucene.getVMEnv().attachCurrentThread()
--- a/src/ldt/ldt/ldt_utils/admin.py	Thu Aug 18 17:00:31 2011 +0200
+++ b/src/ldt/ldt/ldt_utils/admin.py	Fri Aug 19 11:31:57 2011 +0200
@@ -47,7 +47,7 @@
             form = ReindexForm(request.POST)
             if form.is_valid():    
                 # try:
-                writer = ldt.indexation.get_writer()
+                writer = ldt.indexation.get_writer(True)
                 try:
                     contentList = form.cleaned_data["contents"]
                     indexer = ContentIndexer(contentList, writer)
--- a/web/ldtplatform/config.py.tmpl	Thu Aug 18 17:00:31 2011 +0200
+++ b/web/ldtplatform/config.py.tmpl	Fri Aug 19 11:31:57 2011 +0200
@@ -13,6 +13,7 @@
 STREAM_SRC_PREFIX = ""
  
 BASE_STATIC_ROOT = os.path.abspath(BASE_DIR + "../static/").rstrip("/")+"/"
+BASE_STATIC_URL = BASE_URL + 'static/' 
 
 # Absolute path to the directory that holds media.
 # Example: "/home/media/media.lawrence.com/"
@@ -32,6 +33,10 @@
 # PATH where uploaded media are put.
 STREAM_PATH = CONTENT_ROOT
 
+ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/'
+LDT_MEDIA_PREFIX = STATIC_URL + 'ldt/'
+
+
 
 DATABASES = {
     'default': {
--- a/web/ldtplatform/modwsgi.wsgi	Thu Aug 18 17:00:31 2011 +0200
+++ b/web/ldtplatform/modwsgi.wsgi	Fri Aug 19 11:31:57 2011 +0200
@@ -25,6 +25,11 @@
     import django.core.handlers.wsgi
 
     _application = django.core.handlers.wsgi.WSGIHandler()
+    
+    if environ.get('PYDEV_DEBUG', "False").lower() in ["true", "1", "t"]:
+        import pydevd #@UnresolvedImport
+        pydevd.settrace(suspend=False)
+
 
     return _application(environ, start_response)