Skip to content

Commit

Permalink
Fix tests, fix django 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
klen committed Dec 14, 2014
1 parent d57c6ec commit b23ea8b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 31 deletions.
24 changes: 11 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
language: python

python:
- "2.7"
- "3.4"
- "2.7"

env:
- TOXENV=py27-d15
- TOXENV=py27-d16
- TOXENV=py27-d17
- TOXENV=py33-d17
- TOXENV=cov
- TOXENV=py27-d16
- TOXENV=py27-d17
- TOXENV=py34-d17
- TOXENV=cov

branches:
only:
- master
- develop
- master
- develop

install: pip install --quiet --use-mirrors tox

script: tox

after_script:
- if [ $TOXENV == "cov" ]; then
pip install --quiet --use-mirrors coveralls;
coveralls;
fi
- if [ $TOXENV == "cov" ]; then
pip install --quiet --use-mirrors coveralls;
coveralls;
fi
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Requirements
============

- python >= 2.7
- django >= 1.5
- django >= 1.6
- markdown


Expand Down
13 changes: 5 additions & 8 deletions django_markdown/templatetags/django_markdown_static.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
from django.apps import apps
from django.conf import settings
from django.template import Library

register = Library()

_static = None
if 'django.contrib.staticfiles' in settings.INSTALLED_APPS:
from django.contrib.staticfiles.templatetags.staticfiles import static as _static
else:
from django.templatetags.static import static as _static


@register.simple_tag
def static(path):
global _static
if _static is None:
if apps.is_installed('django.contrib.staticfiles'):
from django.contrib.staticfiles.templatetags.staticfiles import static as _static
else:
from django.templatetags.static import static as _static
return _static(path)
12 changes: 3 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist=py27-d15,py27-d16,py27-d17,py33-d17,cov
envlist=py27-d16,py27-d17,py34-d17,cov

[pylama]
skip=example/*
Expand All @@ -26,12 +26,6 @@ commands=py.test
deps =
pytest

[testenv:py27-d15]
basepython = python2.7
deps =
django==1.5.9
{[testenv]deps}

[testenv:py27-d16]
basepython = python2.7
deps =
Expand All @@ -44,8 +38,8 @@ deps =
django==1.7
{[testenv]deps}

[testenv:py33-d17]
basepython = python3.3
[testenv:py34-d17]
basepython = python3.4
deps =
django==1.7
{[testenv]deps}
Expand Down

0 comments on commit b23ea8b

Please sign in to comment.