"""
Brochures url patterns..
"""

from django.conf.urls import *
from views import Create, Download, FlipBook, choose, all_pdfs, home, api, help, sections, notes
from django.contrib.auth import views as auth_views

urlpatterns = patterns('',
    url(r'^brochure/(?P<pdf_name>[A-z0-9\-\_]+)/download/(?P<pdf_md5>[A-Za-z0-9]{32})/$', Download, name="binder_download"),
    url(r'^brochure/(?P<pdf_name>[A-z0-9\-\_]+)/flipbook/(?P<pdf_md5>[A-Za-z0-9]{32})/$', FlipBook, name="binder_flipbook"),
    url(r'^brochure/(?P<pdf_name>[A-z0-9\-\_]+)/{0,1}$', Create, name="binder_create"),
    url(r'^brochure/(?P<pdf_name>[A-z0-9\-\_]+)/api/$', api, name="api"),
    url(r'^brochure/(?P<pdf_name>[A-z0-9\-\_]+)/help/$', help, name="help"),
    url(r'^brochure/(?P<pdf_name>[A-z0-9\-\_]+)/sections/$', sections, name="sections"),
    url(r'^brochure/$', choose, name="binder_choose"),
    url(r'^all/$', all_pdfs, name="binder_all"),
    url(r'^home/$', home, name="binder_home"),
    url(r'^accounts/login/$', auth_views.login, {'template_name': 'binder/login.html',}, name='auth_login'),
    url(r'^accounts/logout/$', auth_views.logout, {'template_name': 'binder/logout.html',}, name='auth_logout'),
    url(r'^notes/$', notes, name="notes"),
)
