django-defender/defender/urls.py
Eric Buckley 2913b5f38b making urlpatterns a plain list
as of Django 1.8, creating urlpatterns with the
`django.conf.urls.patterns` function became deprecated and will be
removed in 1.10.

https://docs.djangoproject.com/en/1.8/ref/urls/#patterns
2016-04-19 21:09:26 -07:00

12 lines
459 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-z0-9-._]+)/unblock$', unblock_ip_view,
name="defender_unblock_ip_view"),
url(r'^blocks/username/(?P<username>[a-z0-9-._@]+)/unblock$',
unblock_username_view,
name="defender_unblock_username_view"),
]