Skip to content

Commit

Permalink
Updated changelog and version pre-bump
Browse files Browse the repository at this point in the history
  • Loading branch information
mbi committed Feb 7, 2018
1 parent 2c2c9f2 commit c3bcf1f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Version 0.5.7 (unreleased)
--------------------------
* Use standard rendering of widgets (Issue #128, PR #133, thanks @ziima)


Version 0.5.6
-------------
* Updated render method to adapt for Django 2.1 (PR #120, thanks @skozan)
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, 6)
VERSION = (0, 5, 7)


def get_version(svn=False):
Expand Down
9 changes: 7 additions & 2 deletions captcha/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import json
import re
import six
import warnings
from testfixtures import LogCapture
import os
try:
Expand Down Expand Up @@ -196,8 +197,12 @@ def test_invalid_output_format(self):
for urlname in ('captcha-test', 'captcha-test-model-form'):
settings.CAPTCHA_OUTPUT_FORMAT = u('%(image)s')
try:
self.client.get(reverse(urlname))
self.fail()
with warnings.catch_warnings(record=True) as w:
self.client.get(reverse(urlname))
assert len(w) == 1
self.assertTrue('CAPTCHA_OUTPUT_FORMAT' in str(w[-1].message))
self.fail()

except ImproperlyConfigured as e:
self.assertTrue('CAPTCHA_OUTPUT_FORMAT' in str(e))

Expand Down
12 changes: 3 additions & 9 deletions captcha/tests/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
from django.http import HttpResponse
from django.contrib.auth.models import User
from six import u
import django

try:
from django.template import engines, RequestContext
from django.template import engines
__is_18 = True
except ImportError:
from django.template import RequestContext, loader
from django.template import loader
__is_18 = False


Expand Down Expand Up @@ -56,12 +55,7 @@ def _test(request, form_class):

t = _get_template(TEST_TEMPLATE)

if django.VERSION >= (1, 9):
return HttpResponse(
t.render(context=dict(passed=passed, form=form), request=request))
else:
return HttpResponse(
t.render(RequestContext(request, dict(passed=passed, form=form))))
return HttpResponse(t.render(context=dict(passed=passed, form=form), request=request))


def test(request):
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@

# General information about the project.
project = u('Django Simple Captcha')
copyright = u('2011-2017 Marco Bonetti')
copyright = u('2011-2018 Marco Bonetti and contributors')

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.5.6'
version = '0.5.7'
# The full version, including alpha/beta/rc tags.
release = version

Expand Down

0 comments on commit c3bcf1f

Please sign in to comment.