Skip to content

Commit

Permalink
Merge branch 'pr/146'
Browse files Browse the repository at this point in the history
  • Loading branch information
mbi committed Jun 20, 2018
2 parents ec6b29b + affb586 commit 158fff0
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 79 deletions.
2 changes: 1 addition & 1 deletion .pep8
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[flake8]
ignore = E501
exclude = south_migrations,migrations,.venv_*,docs
exclude = migrations,.venv_*,docs
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ matrix:
env: TOX_ENV=py36-django20
- python: "3.6"
env: TOX_ENV=py36-django21
- python: "3.6"
env: TOX_ENV=py36-django20-jinja2
- python: "2.7"
env: TOX_ENV=py27-django18
- python: "2.7"
Expand Down
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Version History
===============

Version 0.5.8
-------------
* Add support for Jinja2 templates (Issue #145, PR #146, thanks @ziima)


Version 0.5.7
-------------
* Use templates for rendering of widgets (Issue #128, #134, PR #133, #139, thanks @ziima)
Expand Down
2 changes: 1 addition & 1 deletion captcha/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = (0, 5, 7)
VERSION = (0, 5, 8)


def get_version(svn=False):
Expand Down
2 changes: 2 additions & 0 deletions captcha/jinja2/captcha/widgets/captcha.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{% if audio %}<a href="{{ audio }}">{% endif %}<img src="{{ image }}" alt="captcha" class="captcha" />{% if audio %}</a>{% endif %}
{% include "django/forms/widgets/multiwidget.html" %}
21 changes: 0 additions & 21 deletions captcha/migrations/__init__.py
Original file line number Diff line number Diff line change
@@ -1,21 +0,0 @@
"""
Django migrations for django-simple-captcha app
This package does not contain South migrations. South migrations can be found
in the ``south_migrations`` package.
"""

SOUTH_ERROR_MESSAGE = """\n
For South support, customize the SOUTH_MIGRATION_MODULES setting like so:
SOUTH_MIGRATION_MODULES = {
'captcha': 'captcha.south_migrations',
}
"""

# Ensure the user is not using Django 1.6 or below with South
try:
from django.db import migrations # noqa
except ImportError:
from django.core.exceptions import ImproperlyConfigured
raise ImproperlyConfigured(SOUTH_ERROR_MESSAGE)
39 changes: 0 additions & 39 deletions captcha/south_migrations/0001_initial.py

This file was deleted.

Empty file.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
# built documents.
#
# The short X.Y version.
version = '0.5.7'
version = '0.5.8'
# The full version, including alpha/beta/rc tags.
release = version

Expand Down
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ def run_tests(self):


install_requires = [
'setuptools',
'six >=1.2.0',
'Django >= 1.8',
'Pillow >=2.2.2',
'Pillow >=2.2.2,<5.0',
'django-ranged-response == 0.2.0'
]
EXTRAS_REQUIRE = {
'test': ('testfixtures', ),
}


with open('README.rst') as readme:
Expand Down Expand Up @@ -67,6 +69,7 @@ def run_tests(self):
include_package_data=True,
zip_safe=False,
install_requires=install_requires,
extras_require=EXTRAS_REQUIRE,
tests_require=['tox'],
cmdclass={'test': Tox},
)
3 changes: 3 additions & 0 deletions testproject/jinja2_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .settings import * # noqa

FORM_RENDERER = 'django.forms.renderers.Jinja2'
34 changes: 20 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
envlist =
{py27,py36}-django{18,19,110,111},
py36-django{20,21},
py36-django20-jinja2,
gettext,flake8,docs

skipsdist = True


[testenv]
changedir = testproject
commands =
Expand All @@ -16,20 +14,28 @@ setenv =
PYTHONDONTWRITEBYTECODE=1

deps =
django18: Django==1.8.7
django19: Django==1.9
django110: Django==1.10
django111: Django==1.11
django20: Django==2.0
django21: Django==2.1a1
django18: Django==1.8.*
django19: Django==1.9.*
django110: Django==1.10.*
django111: Django==1.11.*
django20: Django==2.0.*
django21: Django>=2.1a1,<=2.1.99

py27-django{18,19,110,111}: python-memcached
py36-django{18,19,110,111,20,21}: python3-memcached
Pillow<5.0
six
south
testfixtures
django-ranged-response
extras =
test


# Test latest Python-Django combination with Jinja2 templates
[testenv:py36-django20-jinja2]
basepython = python3.6
setenv =
DJANGO_SETTINGS_MODULE=jinja2_settings
deps =
jinja2
Django==2.0.*


[testenv:gettext]
basepython = python3
Expand Down

0 comments on commit 158fff0

Please sign in to comment.