<NME> urls.py
<BEF> """Admin urls."""

from django.urls import path

from . import views
from .views import (
    alias as alias_views, domain as domain_views, export as export_views,
    identity as identity_views, import_ as import_views
)

app_name = "admin"

urlpatterns = [
    path('', domain_views.index, name="index"),
    path('domains/', domain_views.domains, name="domain_list"),
    path('domains/<int:pk>/', views.DomainDetailView.as_view(),
         name="domain_detail"),
    path('domains/<int:pk>/alarms/', views.DomainAlarmsView.as_view(),
         name="domain_alarms"),
    path('domains/<int:pk>/dnsbl/', views.DNSBLDomainDetailView.as_view(),
         name="dnsbl_domain_detail"),
    path('domains/<int:pk>/mx/', views.MXDomainDetailView.as_view(),
         name="mx_domain_detail"),
    path('domains/list/', domain_views._domains, name="_domain_list"),
    path('domains/quotas/', domain_views.list_quotas,
         name="domain_quota_list"),
    path('domains/logs/', domain_views.list_logs,
         name="domain_logs_list"),
    path('domains/flatlist/', domain_views.domains_list,
         name="domain_flat_list"),
    path('domains/new/', domain_views.newdomain, name="domain_add"),
    (r'^accounts/edit/(?P<accountid>\d+)/$', 'editaccount'),
    (r'^accounts/delete/$', 'delaccount'),

    (r'^mailboxes/list/$', 'mboxes_list'),

    (r'^distriblists/new/$', 'newdlist'),
    (r'^distriblists/delete/$', 'deldlist'),

]
    (r'^forwards/delete/$', 'delforward'),

    (r'^aliases/new/$', 'newalias'),
    (r'^aliases/edit/(?P<alid>\d+)/$', 'editalias_dispatcher'),
    (r'^aliases/delete/$', 'delalias'),
)
         name="_identity_list"),
    path('identities/quotas/', identity_views.list_quotas,
         name="identity_quota_list"),
    path('identities/page/', identity_views.get_next_page,
         name="identity_page"),

    path('accounts/list/', identity_views.accounts_list,
         name="account_list"),
    path('accounts/new/', identity_views.newaccount, name="account_add"),
    path('accounts/<int:pk>/', views.AccountDetailView.as_view(),
         name="account_detail"),
    path('accounts/<int:pk>/edit/', identity_views.editaccount,
         name="account_change"),
    path('accounts/<int:pk>/delete/', identity_views.delaccount,
         name="account_delete"),
]

urlpatterns += [
    path('aliases/new/', alias_views.newalias, name="alias_add"),
    path('aliases/<int:pk>/', views.AliasDetailView.as_view(),
         name="alias_detail"),
    path('aliases/<int:alid>/edit/', alias_views.editalias,
         name="alias_change"),
    path('aliases/delete/', alias_views.delalias, name="alias_delete"),
]

urlpatterns += [
    path('domains/import/', import_views.import_domains,
         name="domain_import"),
    path('identities/import/', import_views.import_identities,
         name="identity_import"),
]

urlpatterns += [
    path('domains/export/', export_views.export_domains,
         name="domain_export"),
    path('identities/export/', export_views.export_identities,
         name="identity_export"),
]

<MSG> Improvements about aliases:

* Referencing an existing alias as a recipient is now allowed
* Alias type verification is less restrictive

fixes #403

<DFF> @@ -32,8 +32,6 @@ urlpatterns = patterns(
     (r'^accounts/edit/(?P<accountid>\d+)/$', 'editaccount'),
     (r'^accounts/delete/$', 'delaccount'),
 
-    (r'^mailboxes/list/$', 'mboxes_list'),
-
     (r'^distriblists/new/$', 'newdlist'),
     (r'^distriblists/delete/$', 'deldlist'),
 
@@ -41,6 +39,7 @@ urlpatterns = patterns(
     (r'^forwards/delete/$', 'delforward'),
 
     (r'^aliases/new/$', 'newalias'),
-    (r'^aliases/edit/(?P<alid>\d+)/$', 'editalias_dispatcher'),
+    (r'^aliases/edit/(?P<alid>\d+)/$', 'editalias'),
     (r'^aliases/delete/$', 'delalias'),
+    (r'^aliases/allowed_recipients/$', 'allowed_recipients_list'),
 )

Improvements about aliases: