from django.conf.urls import patterns, url
from django.contrib.auth import views as auth_views

from . import views


urlpatterns = patterns(
    "",
    url(
        r"^login/$",
        auth_views.login,
        {"template_name": "accounts/login.html"},
        name="user_login",
    ),
    url(
        r"^logout/$",
        auth_views.logout,
        {"template_name": "accounts/logout.html"},
        name="user_logout",
    ),
    url(
        r"^password/change/$",
        auth_views.password_change,
        {"template_name": "accounts/password_change_form.html"},
        name="password_change",
    ),
    url(
        r"^password/change/done/$",
        auth_views.password_change_done,
        {"template_name": "accounts/password_change_done.html"},
    ),
    url(
        r"^password/reset/$",
        auth_views.password_reset,
        {
            "template_name": "accounts/password_reset_form.html",
            "email_template_name": "accounts/email/password_reset_email.txt",
            "subject_template_name": "accounts/email/password_reset_subject.txt",
        },
        name="password_reset",
    ),
    url(
        r"^password/reset/confirm/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$",
        auth_views.password_reset_confirm,
        {"template_name": "accounts/password_reset_confirm_form.html"},
        name="password_reset_confirm",
    ),
    url(
        r"^password/reset/complete/$",
        auth_views.password_reset_complete,
        {"template_name": "accounts/password_reset_complete.html"},
        name="auth_password_reset_complete",
    ),
    url(
        r"^password/reset/done/$",
        auth_views.password_reset_done,
        {"template_name": "accounts/password_reset_done.html"},
    ),
    url(r"^profile/create/$", views.profile_create, name="profile_create"),
    url(
        r"^profile/create/complete/$",
        views.profile_create_complete,
        name="profile_create_complete",
    ),
    url(r"^profile/edit/$", views.profile_edit, name="profile_edit"),
    url(r"^profile/$", views.profile_edit, name="profile_edit"),
    url(r"^profile/orders/$", views.view_orders_subs, name="profile_orders_subs"),
)
