mirror of
https://github.com/jazzband/django-defender.git
synced 2026-03-16 22:10:32 +00:00
This fixes bug #GH76 where an exception like
```
Reverse for 'defender_unblock_username_view' with arguments '(u'user+test@domain.tld',)' and keyword arguments '{}' not found. 1 pattern(s) tried: [u'admin/defender/blocks/username/(?P[A-Za-z0-9-._@]+)/unblock$']
```
was raised when trying to access the `/admin/defender/blocks/` URL when a user with a plus sign had been locked out.
12 lines
467 B
Python
12 lines
467 B
Python
from django.conf.urls import url
|
|
from .views import block_view, unblock_ip_view, unblock_username_view
|
|
|
|
urlpatterns = [
|
|
url(r'^blocks/$', block_view,
|
|
name="defender_blocks_view"),
|
|
url(r'^blocks/ip/(?P<ip_address>[A-Za-z0-9-._]+)/unblock$', unblock_ip_view,
|
|
name="defender_unblock_ip_view"),
|
|
url(r'^blocks/username/(?P<username>[A-Za-z0-9-._@\+]+)/unblock$',
|
|
unblock_username_view,
|
|
name="defender_unblock_username_view"),
|
|
]
|