diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-01-29 19:09:33 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-01-29 19:09:33 +0100 |
commit | 1d1d49c4c8e01650d09f174fee923243361f20f7 (patch) | |
tree | 9530ea899863d698dbda66488714670307e7aa07 | |
parent | 717ee6e71d780d11c0d4bcaf445f966c0cfd0098 (diff) | |
download | Chimère-1d1d49c4c8e01650d09f174fee923243361f20f7.tar.bz2 Chimère-1d1d49c4c8e01650d09f174fee923243361f20f7.zip |
Update migration errors
-rw-r--r-- | MANIFEST.in | 2 | ||||
-rw-r--r-- | README.txt | 6 | ||||
-rw-r--r-- | apache/django.wsgi | 5 | ||||
-rw-r--r-- | chimere/models.py | 11 | ||||
-rw-r--r-- | docs/en/upgrade.rst | 3 | ||||
-rw-r--r-- | docs/fr/upgrade.rst | 3 |
6 files changed, 20 insertions, 10 deletions
diff --git a/MANIFEST.in b/MANIFEST.in index 53f651c..565fbbc 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ -include *.txt COPYING MANIFEST.in +include *.txt MANIFEST.in include chimere/tests/* prune docs/*/build/ prune example_project/local_settings.py @@ -36,6 +36,6 @@ External libs ============= To be fully functional, this package is provided with external libs: - - `OsmApi <http://wiki.openstreetmap.org/wiki/PythonOsmApi>`, GPL v3. - - `prettyPhoto <http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/>`, GPL v2. - - `jMediaelement <https://github.com/aFarkas/jMediaelement>`, GPL v2. + - `OsmApi <http://wiki.openstreetmap.org/wiki/PythonOsmApi>`_ - GPL v3. + - `prettyPhoto <http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/>`_ - GPL v2. + - `jMediaelement <https://github.com/aFarkas/jMediaelement>`_ - GPL v2. diff --git a/apache/django.wsgi b/apache/django.wsgi index 6227ee2..16758e6 100644 --- a/apache/django.wsgi +++ b/apache/django.wsgi @@ -1,5 +1,6 @@ import os, sys -sys.path.append('/var/local/django/chimere/') -os.environ['DJANGO_SETTINGS_MODULE'] = 'mychimere_project.settings' +MAIN_PATH = os.path.realpath(os.path.dirname(__file__)) + "/.." +sys.path.append(MAIN_PATH) +os.environ['DJANGO_SETTINGS_MODULE'] = 'mychimere_project.settings' # change with your project name import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() diff --git a/chimere/models.py b/chimere/models.py index 5a4be28..6b0d4b3 100644 --- a/chimere/models.py +++ b/chimere/models.py @@ -1255,11 +1255,14 @@ def area_post_save(sender, **kwargs): perm = Permission.objects.filter(codename=mnemo) lbl = "Can change " + area.name if not perm.count(): - content_type = ContentType.objects.get(app_label="chimere", + try: + content_type = ContentType.objects.get(app_label="chimere", model="area") - perm = Permission(name=lbl, content_type_id=content_type.id, - codename=mnemo) - perm.save() + perm = Permission(name=lbl, content_type_id=content_type.id, + codename=mnemo) + perm.save() + except ObjectDoesNotExist: + pass else: perm = perm.all()[0] if old_name != area.name: diff --git a/docs/en/upgrade.rst b/docs/en/upgrade.rst index d44ae02..fc8dc0f 100644 --- a/docs/en/upgrade.rst +++ b/docs/en/upgrade.rst @@ -195,6 +195,9 @@ Move old static files to the new static directory: cp -ra $CHIMERE_PATH/chimere/static/* $CHIMERE_APP_PATH/static/ cp -ra $CHIMERE_PATH/chimere/static/icons/* $CHIMERE_APP_PATH/media/icons/ cp -ra $CHIMERE_PATH/chimere/static/upload $CHIMERE_APP_PATH/media/ + rm -rf $CHIMERE_PATH/chimere/static/icons + rm -rf $CHIMERE_PATH/chimere/static/upload + Webserver configuration ....................... diff --git a/docs/fr/upgrade.rst b/docs/fr/upgrade.rst index a092b4b..aab4fb6 100644 --- a/docs/fr/upgrade.rst +++ b/docs/fr/upgrade.rst @@ -207,6 +207,9 @@ Déplacez vos anciens fichiers statiques vers le nouveau répertoire : cp -ra $CHIMERE_PATH/chimere/static/* $CHIMERE_APP_PATH/static/ cp -ra $CHIMERE_PATH/chimere/static/icons/* $CHIMERE_APP_PATH/media/icons/ cp -ra $CHIMERE_PATH/chimere/static/upload $CHIMERE_APP_PATH/media/ + rm -rf $CHIMERE_PATH/chimere/static/icons + rm -rf $CHIMERE_PATH/chimere/static/upload + Configuration du serveur Web ............................ |