gva/gnuviechadmin/managemails/urls.py
Jan Dittberner 5429055f0d implement mail address target editing
- extract common code into managemails.forms.MailAddressFieldMixin
- move code from forms into managemails.models.MailAddress
- implement managemails.models.MailboxManager.unused and unused_or_own
- implement managemails.forms.EditMailAddressForm
- add managemails.views.EditMailAddress
- add URL pattern 'edit_mailaddress' to managemails.urls
- add template managemails/mailaddress_edit.html
- add changelog entry
2015-01-25 22:12:03 +01:00

32 lines
1 KiB
Python

"""
This module defines the URL patterns for mailbox and mail address related
views.
"""
from __future__ import absolute_import, unicode_literals
from django.conf.urls import patterns, url
from .views import (
AddMailAddress,
ChangeMailboxPassword,
CreateMailbox,
DeleteMailAddress,
EditMailAddress,
)
urlpatterns = patterns(
'',
url(r'^(?P<package>\d+)/mailbox/create$',
CreateMailbox.as_view(), name='create_mailbox'),
url(r'^(?P<package>\d+)/mailbox/(?P<slug>[\w0-9]+)/setpassword$',
ChangeMailboxPassword.as_view(), name='change_mailbox_password'),
url(r'^(?P<package>\d+)/mailaddress/(?P<domain>[\w0-9-.]+)/create$',
AddMailAddress.as_view(), name='add_mailaddress'),
url(r'^(?P<package>\d+)/mailaddress/(?P<domain>[\w0-9-.]+)/(?P<pk>\d+)'
r'/edit$',
EditMailAddress.as_view(), name='edit_mailaddress'),
url(r'^(?P<package>\d+)/mailaddress/(?P<domain>[\w0-9-.]+)/(?P<pk>\d+)'
r'/delete$',
DeleteMailAddress.as_view(), name='delete_mailaddress'),
)