django-defender/defender/urls.py
Aleksi Häkli a1d526f318
PEP8 formatting (#147)
Run black with Python 2.7 as target version
to unify the code styling and make it more
linter and style guide compliant
2019-11-15 20:22:14 +02:00

16 lines
490 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>[\w]+[^\/]*)/unblock$",
unblock_username_view,
name="defender_unblock_username_view",
),
]