Permalink
Browse files

Python 3.2-support, fix testsuite runs with FeinCMS 1.7.x

Still does not work with the app loading refactor in Django 1.7 alpha.
  • Loading branch information...
1 parent 41f266e commit e36251a3fbb5e45ac58f826204b6fd96ec32fe3f @matthiask matthiask committed Jan 28, 2014
Showing with 21 additions and 4 deletions.
  1. +2 −0 feincms_banners/admin.py
  2. +4 −2 feincms_banners/contents.py
  3. +2 −0 feincms_banners/models.py
  4. +2 −0 feincms_banners/urls.py
  5. +2 −0 feincms_banners/views.py
  6. +3 −2 setup.py
  7. +6 −0 tests/tox.ini
@@ -1,3 +1,5 @@
+from __future__ import absolute_import, unicode_literals
+
from django.contrib import admin
from feincms_banners import models
@@ -1,3 +1,5 @@
+from __future__ import absolute_import, unicode_literals
+
from django.db import models
from django.db.models import F
from django.template.loader import render_to_string
@@ -45,15 +47,15 @@ def render(self, **kwargs):
banner = self.specific
type = banner.type
else:
- return u''
+ return ''
else:
try:
banner = Banner.objects.active().filter(
type=self.type,
).select_related('mediafile').order_by('?')[0]
type = self.type
except IndexError:
- return u''
+ return ''
Banner.objects.filter(id=banner.id).update(embeds=F('embeds') + 1)
@@ -1,3 +1,5 @@
+from __future__ import absolute_import, unicode_literals
+
from random import choice
from django.db import models
@@ -1,3 +1,5 @@
+from __future__ import absolute_import, unicode_literals
+
from django.conf.urls import url, patterns
@@ -1,3 +1,5 @@
+from __future__ import absolute_import, unicode_literals
+
from django.db.models import F
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import get_object_or_404
View
@@ -48,8 +48,9 @@ def read(filename):
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
- # 'Programming Language :: Python :: 3',
- # 'Programming Language :: Python :: 3.3',
+ 'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.2',
+ 'Programming Language :: Python :: 3.3',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development',
],
View
@@ -36,6 +36,7 @@ deps =
django==1.4.7
FeinCMS==1.7.7
django-mptt==0.6.0
+ Pillow==2.3.0
pytz==2013.8
[testenv:py26-1.5-1.7]
@@ -44,6 +45,7 @@ deps =
django==1.5.3
FeinCMS==1.7.7
django-mptt==0.6.0
+ Pillow==2.3.0
pytz==2013.8
[testenv:py26-1.6-1.7]
@@ -52,6 +54,7 @@ deps =
Django==1.6.0
FeinCMS==1.7.7
django-mptt==0.6.0
+ Pillow==2.3.0
pytz==2013.8
@@ -83,6 +86,7 @@ deps =
django==1.4.7
FeinCMS==1.7.7
django-mptt==0.6.0
+ Pillow==2.3.0
pytz==2013.8
[testenv:py27-1.5-1.7]
@@ -91,6 +95,7 @@ deps =
django==1.5.3
FeinCMS==1.7.7
django-mptt==0.6.0
+ Pillow==2.3.0
pytz==2013.8
[testenv:py27-1.6-1.7]
@@ -99,6 +104,7 @@ deps =
Django==1.6.0
FeinCMS==1.7.7
django-mptt==0.6.0
+ Pillow==2.3.0
pytz==2013.8

0 comments on commit e36251a

Please sign in to comment.