"""This module holds the urls for the ``documents`` app

The following views are defined:

- /document/:uuid/ : named "document-detail", used to view the detail of a document
- /document/:uuid/update : named "document-update", used to update a document
- /document/:uuid/delete/ : named "document-delete", used to delete a document, with a confirmation step
- /document/:uuid/download/ : named "document-download", used to download a document

Notes
-----
We use ``django-macros-url`` to ease the use of parameters in urls, for example UUIDs:
``:uuid`` is more readable than
``(?P<uuid>[a-fA-F0-9]{8}-?[a-fA-F0-9]{4}-?[a-fA-F0-9]{4}-?[a-fA-F0-9]{4}-?[a-fA-F0-9]{12})``

"""

from macrosurl import url

from . import views


urlpatterns = [
    url(
        r'^:document_uuid/$',
        views.DocumentDetailView.as_view(),
        name='document-detail'
    ),
    url(
        r'^:document_uuid/update$',
        views.DocumentUpdateView.as_view(),
        name='document-update'
    ),
    url(
        r'^:document_uuid/delete$',
        views.DocumentDeleteView.as_view(),
        name='document-delete'
    ),

]
