mirror of
https://github.com/jazzband/django-axes.git
synced 2026-05-28 08:48:19 +00:00
Merge remote-tracking branch 'upstream/master' into json-response-type
# Conflicts: # axes/decorators.py
This commit is contained in:
commit
5627d1c285
5 changed files with 93 additions and 4 deletions
30
CHANGES.txt
30
CHANGES.txt
|
|
@ -1,6 +1,36 @@
|
|||
Changes
|
||||
=======
|
||||
|
||||
1.6.1 (2016-05-13)
|
||||
------------------
|
||||
|
||||
- Fixes whitelist check when BEHIND_REVERSE_PROXY
|
||||
[Patrick Hagemeister]
|
||||
|
||||
- Made migrations py3 compatible
|
||||
[mvdwaeter]
|
||||
|
||||
- Fixing #126, possibly breaking compatibility with Django<=1.7
|
||||
[int-ua]
|
||||
|
||||
- Add note for upgrading users about new migration files
|
||||
[kelseyq]
|
||||
|
||||
- Fixes #148
|
||||
[camilonova]
|
||||
|
||||
- Decorate auth_views.login only once
|
||||
[teeberg]
|
||||
|
||||
- Set IP public/private classifier to be compliant with RFC 1918.
|
||||
[SilasX]
|
||||
|
||||
- Issue #155. Lockout response status code changed to 403.
|
||||
[Артур Муллахметов]
|
||||
|
||||
- BUGFIX: Missing migration
|
||||
[smeinel]
|
||||
|
||||
1.6.0 (2016-01-07)
|
||||
------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ from django.contrib.auth import logout
|
|||
from django.core.exceptions import ObjectDoesNotExist
|
||||
from django.http import HttpResponse
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.shortcuts import render
|
||||
from django.template.loader import get_template
|
||||
from django.utils import timezone as datetime
|
||||
from django.utils.translation import ugettext_lazy
|
||||
|
|
@ -365,9 +366,7 @@ def lockout_response(request):
|
|||
|
||||
if LOCKOUT_TEMPLATE:
|
||||
context.update({'cooloff_time': COOLOFF_TIME})
|
||||
template = get_template(LOCKOUT_TEMPLATE)
|
||||
content = template.render(context, request)
|
||||
return HttpResponse(content, status=403)
|
||||
return render(request, LOCKOUT_TEMPLATE, context, status=403)
|
||||
|
||||
LOCKOUT_URL = get_lockout_url()
|
||||
if LOCKOUT_URL:
|
||||
|
|
|
|||
59
axes/migrations/0003_auto_20160322_0929.py
Normal file
59
axes/migrations/0003_auto_20160322_0929.py
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('axes', '0002_auto_20151217_2044'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='accessattempt',
|
||||
name='failures_since_start',
|
||||
field=models.PositiveIntegerField(verbose_name='Failed Logins'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='accessattempt',
|
||||
name='get_data',
|
||||
field=models.TextField(verbose_name='GET Data'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='accessattempt',
|
||||
name='http_accept',
|
||||
field=models.CharField(verbose_name='HTTP Accept', max_length=1025),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='accessattempt',
|
||||
name='ip_address',
|
||||
field=models.GenericIPAddressField(null=True, verbose_name='IP Address', db_index=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='accessattempt',
|
||||
name='path_info',
|
||||
field=models.CharField(verbose_name='Path', max_length=255),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='accessattempt',
|
||||
name='post_data',
|
||||
field=models.TextField(verbose_name='POST Data'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='accesslog',
|
||||
name='http_accept',
|
||||
field=models.CharField(verbose_name='HTTP Accept', max_length=1025),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='accesslog',
|
||||
name='ip_address',
|
||||
field=models.GenericIPAddressField(null=True, verbose_name='IP Address', db_index=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='accesslog',
|
||||
name='path_info',
|
||||
field=models.CharField(verbose_name='Path', max_length=255),
|
||||
),
|
||||
]
|
||||
|
|
@ -41,6 +41,7 @@ class CommonAccess(models.Model):
|
|||
)
|
||||
|
||||
class Meta:
|
||||
app_label = 'axes'
|
||||
abstract = True
|
||||
ordering = ['-attempt_time']
|
||||
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -4,7 +4,7 @@
|
|||
import os
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
VERSION = '1.6.0'
|
||||
VERSION = '1.6.1'
|
||||
|
||||
setup(
|
||||
name='django-axes',
|
||||
|
|
|
|||
Loading…
Reference in a new issue