from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^(?P<url_id>[0-9]+)/$', views.redir, name='redir'), url(r'^url=(?P<url_id>[0-9]+)/$', views.url, name='url'), ]