Upgrade to django 1.7: migrations + wsgi init change
authordurandn
Fri, 24 Apr 2015 12:53:42 +0200
changeset 240 53931ed55bc9
parent 239 6888d282b4cc
child 241 8f808aeae027
Upgrade to django 1.7: migrations + wsgi init change
src/ldtplatform/django_wsgi.py
src/ldtplatform/migrations/0001_initial.py
src/ldtplatform/migrations/0002_iri_url_update.py
src/ldtplatform/migrations/0003_recalculate_contentstat.py
src/ldtplatform/settings.py
--- a/src/ldtplatform/django_wsgi.py	Fri Mar 27 18:11:26 2015 +0100
+++ b/src/ldtplatform/django_wsgi.py	Fri Apr 24 12:53:42 2015 +0200
@@ -2,9 +2,9 @@
 
 os.environ['DJANGO_SETTINGS_MODULE'] = 'ldtplatform.settings'
  
-import django.core.handlers.wsgi
+from django.core.wsgi import get_wsgi_application
 
-application = django.core.handlers.wsgi.WSGIHandler()
+application = get_wsgi_application()
 
 if os.environ.get('PYDEV_DEBUG', "False").lower() in ["true", "1", "t"]:
     import pydevd #@UnresolvedImport
--- a/src/ldtplatform/migrations/0001_initial.py	Fri Mar 27 18:11:26 2015 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.v2 import SchemaMigration
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        pass
-
-    def backwards(self, orm):
-        pass
-
-    models = {
-        
-    }
-
-    complete_apps = ['ldtplatform']
\ No newline at end of file
--- a/src/ldtplatform/migrations/0002_iri_url_update.py	Fri Mar 27 18:11:26 2015 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-# -*- coding: utf-8 -*-
-from django.core.management import call_command
-from south.v2 import DataMigration
-
-class Migration(DataMigration):
-
-    def forwards(self, orm):
-        # Call the command from ldt_utils app
-        call_command('updateiriurlinprojects')
-
-    def backwards(self, orm):
-        "Write your backwards methods here."
-
-    models = {
-        
-    }
-
-    complete_apps = ['ldtplatform']
-    symmetrical = True
--- a/src/ldtplatform/migrations/0003_recalculate_contentstat.py	Fri Mar 27 18:11:26 2015 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-# -*- coding: utf-8 -*-
-from django.core.management import call_command
-from south.v2 import DataMigration
-
-class Migration(DataMigration):
-
-    def forwards(self, orm):
-        # Call the command from ldt_utils app
-        call_command('statannotation')
-
-    def backwards(self, orm):
-        "Write your backwards methods here."
-
-    models = {
-        
-    }
-
-    complete_apps = ['ldtplatform']
-    symmetrical = True
--- a/src/ldtplatform/settings.py	Fri Mar 27 18:11:26 2015 +0100
+++ b/src/ldtplatform/settings.py	Fri Apr 24 12:53:42 2015 +0200
@@ -139,7 +139,7 @@
     'oauth_provider',
     #'django_openid_consumer',
     'social.apps.django_app.default',
-    'south',
+    #'south',
     'sorl.thumbnail',
     'ldt',
     'ldt.core',