Merge remote-tracking branch 'caktus/fixes_recent_djangos'

This commit is contained in:
Jannis Leidel 2015-09-24 10:45:14 +02:00
commit f829ae543c
5 changed files with 20 additions and 7 deletions

View file

@ -1,6 +1,12 @@
from django.core.exceptions import ImproperlyConfigured
from django.db.models.signals import post_save
from django.core.cache import get_cache
try:
from django.core.cache import get_cache
except ImportError:
from django.core.cache import caches
def get_cache(name):
return caches[name]
try:
from django.core.cache.backends.locmem import LocMemCache

View file

@ -2,7 +2,7 @@ from django.db.models import signals
from django import VERSION
def create_perm(app, created_models, verbosity, db, **kwargs):
def create_perm(*args, **kwargs):
"""
Creates a fake content type and permission
to be able to check for permissions
@ -23,4 +23,7 @@ def create_perm(app, created_models, verbosity, db, **kwargs):
codename='change_config')
signals.post_syncdb.connect(create_perm, dispatch_uid="constance.create_perm")
if hasattr(signals, 'post_syncdb'):
signals.post_syncdb.connect(create_perm, dispatch_uid="constance.create_perm")
else:
signals.post_migrate.connect(create_perm, dispatch_uid="constance.create_perm")

View file

@ -1,6 +1,5 @@
{% extends "admin/base_site.html" %}
{% load admin_static admin_list i18n %}
{% load url from future %}
{% block extrastyle %}

View file

@ -1,4 +1,7 @@
from django.utils.importlib import import_module
try:
from importlib import import_module
except ImportError:
from django.utils.importlib import import_module
def import_module_attr(path):

View file

@ -3,8 +3,8 @@ envlist =
py26-django-14,
py27-django-14,
{py26,py27,py32,py33,py34,pypy}-django-{15,16},
{py27,py32,py33,py34,pypy}-django-17
{py27,py33,py34,pypy}-django-master
{py27,py32,py33,py34,pypy}-django-{17,18}
{py27,py34,py35,pypy}-django-master
[testenv]
basepython =
@ -13,6 +13,7 @@ basepython =
py32: python3.2
py33: python3.3
py34: python3.4
py35: python3.5
pypy: pypy
deps =
redis
@ -24,6 +25,7 @@ deps =
django-15: Django>=1.5,<1.6
django-16: Django>=1.6,<1.7
django-17: Django>=1.7,<1.8
django-18: Django>=1.8,<1.9
django-master: https://github.com/django/django/archive/master.tar.gz
usedevelop = true
commands =