continue django 1.7 upgrade
authorymh <ymh.work@gmail.com>
Thu, 19 Mar 2015 23:39:54 +0100
changeset 559 1357a0cfdbf7
parent 558 92d0f441ca7f
child 560 fdae9a3ce2bb
continue django 1.7 upgrade
.settings/org.eclipse.core.resources.prefs
src/hdalab/__init__.py
src/hdalab/apps.py
src/hdalab/models/__init__.py
src/hdalab/models/renkan.py
--- a/.settings/org.eclipse.core.resources.prefs	Thu Mar 19 22:52:51 2015 +0100
+++ b/.settings/org.eclipse.core.resources.prefs	Thu Mar 19 23:39:54 2015 +0100
@@ -16,6 +16,7 @@
 encoding//src/hdabo/views.py=utf-8
 encoding//src/hdabo/wp_utils.py=utf-8
 encoding//src/hdalab/__init__.py=utf-8
+encoding//src/hdalab/apps.py=utf-8
 encoding//src/hdalab/celery.py=utf-8
 encoding//src/hdalab/config.py=utf-8
 encoding//src/hdalab/fields.py=utf-8
--- a/src/hdalab/__init__.py	Thu Mar 19 22:52:51 2015 +0100
+++ b/src/hdalab/__init__.py	Thu Mar 19 23:39:54 2015 +0100
@@ -17,10 +17,6 @@
 
 __version__ = get_version()
 
-try:
-    from .celery import app as celery_app
-except:
-    pass
+default_app_config = 'hdalab.apps.HdalabAppConfig'
 
 
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hdalab/apps.py	Thu Mar 19 23:39:54 2015 +0100
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+'''
+Created on Mar 19, 2015
+
+@author: ymh
+'''
+
+from __future__ import absolute_import
+
+from django.apps import AppConfig
+
+
+class HdalabAppConfig(AppConfig):
+    
+    name = "hdalab"
+    verbose_name = "HdaLab"
+    
+    def ready(self):
+        from .celery import app as celery_app  # @UnusedImport
+        import hdalab.signals # @UnusedImport
\ No newline at end of file
--- a/src/hdalab/models/__init__.py	Thu Mar 19 22:52:51 2015 +0100
+++ b/src/hdalab/models/__init__.py	Thu Mar 19 23:39:54 2015 +0100
@@ -4,5 +4,3 @@
 from hdalab.models.renkan import HdalabRenkan, HdalabRenkanStateTransition
 
 __all__ = ['WpCategory', 'InfoboxParameter', 'TagInfobox', 'TagWpCategory', 'TagYears', 'Country', 'GeoInclusion', 'TagLinks', 'DbpediaFields', 'DbpediaFieldsTranslation', 'HdaSession', 'InseeCoords', 'DatasheetExtras', 'WpCategoryInclusion', 'HdalabRenkan', 'HdalabRenkanStateTransition']
-
-import hdalab.signals
\ No newline at end of file
--- a/src/hdalab/models/renkan.py	Thu Mar 19 22:52:51 2015 +0100
+++ b/src/hdalab/models/renkan.py	Thu Mar 19 23:39:54 2015 +0100
@@ -9,7 +9,7 @@
 
 from django.conf import settings
 from django.db import models
-from django.utils.translation import ugettext as _
+from django.utils.translation import ugettext_lazy as _
 
 
 logger = logging.getLogger(__name__)