Django 1.7 & Python 3.4 compatibility.
authorRadek Czajka <rczajka@rczajka.pl>
Fri, 19 Sep 2014 21:45:57 +0000 (23:45 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Fri, 19 Sep 2014 23:46:05 +0000 (01:46 +0200)
requirements.txt
src/accounts/migrations/0001_initial.py
src/cas/settings.py

index ffd8cdb..d973b7c 100644 (file)
@@ -1,8 +1,8 @@
--i http://pypi.nowoczesnapolska.org.pl/simple
+-i https://py.mdrn.pl:8443/simple
 
-Django>=1.6,<1.7
-South
+Django>=1.7,<1.8
 lxml>=2.2
 django-gravatar2
+Pillow
 
--e git+https://github.com/rczajka/django-cas-provider.git@1d2632a20124e8d08a234486e3c2da81b23d5734#egg=django-cas-provider
+-e git+https://github.com/rczajka/django-cas-provider.git@979cc8e80c887caa8a91a86dd2ed2971bfe2bff5#egg=django-cas-provider
index 87acc1b..2a6a4ba 100644 (file)
@@ -1,38 +1,27 @@
 # -*- coding: utf-8 -*-
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding model 'Service'
-        db.create_table(u'accounts_service', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('ordering', self.gf('django.db.models.fields.IntegerField')()),
-            ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
-            ('url', self.gf('django.db.models.fields.URLField')(max_length=200)),
-            ('image', self.gf('django.db.models.fields.files.ImageField')(max_length=100)),
-        ))
-        db.send_create_signal(u'accounts', ['Service'])
-
-
-    def backwards(self, orm):
-        # Deleting model 'Service'
-        db.delete_table(u'accounts_service')
-
-
-    models = {
-        u'accounts.service': {
-            'Meta': {'ordering': "('ordering',)", 'object_name': 'Service'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'ordering': ('django.db.models.fields.IntegerField', [], {}),
-            'url': ('django.db.models.fields.URLField', [], {'max_length': '200'})
-        }
-    }
-
-    complete_apps = ['accounts']
\ No newline at end of file
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='Service',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('ordering', models.IntegerField()),
+                ('name', models.CharField(max_length=255)),
+                ('url', models.URLField()),
+                ('image', models.ImageField(upload_to=b'accounts/service/')),
+            ],
+            options={
+                'ordering': ('ordering',),
+            },
+            bases=(models.Model,),
+        ),
+    ]
index 0c8ec90..562111c 100644 (file)
@@ -76,11 +76,19 @@ INSTALLED_APPS = (
 
     'cas_provider',
     'django_gravatar',
-    'south',
 
     'accounts',
 )
 
+MIDDLEWARE_CLASSES = (
+    'django.contrib.sessions.middleware.SessionMiddleware',
+    'django.middleware.common.CommonMiddleware',
+    'django.middleware.csrf.CsrfViewMiddleware',
+    'django.contrib.auth.middleware.AuthenticationMiddleware',
+    'django.contrib.messages.middleware.MessageMiddleware',
+    'django.middleware.clickjacking.XFrameOptionsMiddleware',
+)
+
 TEMPLATE_CONTEXT_PROCESSORS = (
     "django.contrib.auth.context_processors.auth",
     "django.core.context_processors.debug",
@@ -104,6 +112,6 @@ GRAVATAR_URL_PREFIX = 'https://www.gravatar.com/'
 
 # Import localsettings file, which may override settings defined here
 try:
-    from localsettings import *
+    from .localsettings import *
 except ImportError:
     pass