# HG changeset patch # User ymh # Date 1276189306 -7200 # Node ID d992dc4ad83fee96e0194af4cbf90910e56460c3 # Parent 6115d1ce3a3e03a036d11867763dd0238c97dde5# Parent d61862b2cfe35bcc16537971186cc82eac60852a Merge with d61862b2cfe35bcc16537971186cc82eac60852a diff -r d61862b2cfe3 -r d992dc4ad83f .hgtags --- a/.hgtags Thu Jun 10 19:16:58 2010 +0200 +++ b/.hgtags Thu Jun 10 19:01:46 2010 +0200 @@ -1,1 +1,2 @@ 65e914ac91c87678892bb29cbdfa39ace3aa3183 V00.01 +b3692a42ac798d6752d8efeb5eeb7ded0f4de295 V00.02 diff -r d61862b2cfe3 -r d992dc4ad83f web/eulalie/__init__.py --- a/web/eulalie/__init__.py Thu Jun 10 19:16:58 2010 +0200 +++ b/web/eulalie/__init__.py Thu Jun 10 19:01:46 2010 +0200 @@ -1,4 +1,4 @@ -VERSION = (0,1) +VERSION = (0,2) VERSION_STR = unicode(".".join(map(lambda i:"%02d" % (i,), VERSION))) diff -r d61862b2cfe3 -r d992dc4ad83f web/eulalie/config.py.tmpl --- a/web/eulalie/config.py.tmpl Thu Jun 10 19:16:58 2010 +0200 +++ b/web/eulalie/config.py.tmpl Thu Jun 10 19:01:46 2010 +0200 @@ -61,3 +61,4 @@ REGISTRATION_OPEN = False LDT_MAX_SEARCH_NUMBER = 50 +LDT_JSON_DEFAULT_INDENT = 2 diff -r d61862b2cfe3 -r d992dc4ad83f web/eulalie/settings.py --- a/web/eulalie/settings.py Thu Jun 10 19:16:58 2010 +0200 +++ b/web/eulalie/settings.py Thu Jun 10 19:01:46 2010 +0200 @@ -126,12 +126,16 @@ "__MACOSX", ) +LDT_JSON_DEFAULT_INDENT +ACCOUNT_ACTIVATION_DAYS = 7 + +LDT_MAX_SEARCH_NUMBER = 50 +LDT_JSON_DEFAULT_INDENT = 2 + + from config import * LOGIN_URL = BASE_URL + 'eulalie/accounts/login/' LOGOUT_URL = BASE_URL + 'eulalie' -ACCOUNT_ACTIVATION_DAYS = 7 - -LDT_MAX_SEARCH_NUMBER = 50 diff -r d61862b2cfe3 -r d992dc4ad83f web/ldt/ldt_utils/models.py --- a/web/ldt/ldt_utils/models.py Thu Jun 10 19:16:58 2010 +0200 +++ b/web/ldt/ldt_utils/models.py Thu Jun 10 19:01:46 2010 +0200 @@ -2,7 +2,7 @@ from django.conf import settings from ldt.core.models import Document, Owner from django.utils.translation import ugettext_lazy as _ -from utils import create_ldt, copy_ldt, create_iri +from utils import create_ldt, copy_ldt, create_empty_iri import os import os.path import uuid @@ -50,13 +50,18 @@ def save(self): # create iri file if needed - iri_file_path = self.iri_file_path() - if not os.path.exists(iri_file_path): - dir = os.path.dirname(iri_file_path) - if not os.path.exists(dir): - os.makedirs(dir) - file = open(iri_file_path,"w") - create_iri(file, self, "IRI") + try: + iri_file_path = self.iri_file_path() + if not os.path.exists(iri_file_path): + dir = os.path.dirname(iri_file_path) + if not os.path.exists(dir): + os.makedirs(dir) + file = open(iri_file_path,"w") + create_empty_iri(file, self, "IRI") + except Exception, e: + if os.path.exists(iri_file_path): + os.remove(iri_file_path) + raise e # update it super(Content, self).save() diff -r d61862b2cfe3 -r d992dc4ad83f web/ldt/ldt_utils/templates/ldt/ldt_utils/ldt_list.html --- a/web/ldt/ldt_utils/templates/ldt/ldt_utils/ldt_list.html Thu Jun 10 19:16:58 2010 +0200 +++ b/web/ldt/ldt_utils/templates/ldt/ldt_utils/ldt_list.html Thu Jun 10 19:01:46 2010 +0200 @@ -2,8 +2,6 @@ {# list of projects ldt #} {%load i18n %} {% block js_import %}{{ block.super }} -