# -*- encoding: utf-8 -*-
"""
Created on 03.10.2011

@author: christian
"""
from django.conf.urls import url

from .views import ArticleArchiveIndex, ArticleForm, ArticleYearArchive, \
    ArticleMonthArchive, ArticleDetail


urlpatterns = [
    url(r'^$', ArticleArchiveIndex.as_view(), name='article-archive'),
    url(r'^add/$', ArticleForm.as_view(), name='add-article'),
    url(r'^edit/(?P<pk>[\d]+)/$', ArticleForm.as_view(), name='edit-article'),
    url(r'^(?P<year>[\d]{4})/$', ArticleYearArchive.as_view(),
        name='article-archive'),
    url(r'^(?P<year>[\d]{4})/(?P<month>[\d]+)/$', ArticleMonthArchive.as_view(),
        name='article-archive'),
    url(r'^(?P<year>[\d]{4})/(?P<month>[\d]+)/(?P<slug>[\-\d\w]+)/$',
        ArticleDetail.as_view(), name='show-article'),
    url(r'^(?P<category>[\-\d\w]+)/$', ArticleArchiveIndex.as_view(),
        name='article-archive'),
    url(r'^(?P<category>[\-\d\w]+)/(?P<year>[\d]{4})/$',
        ArticleYearArchive.as_view(), name='article-archive'),
    url(r'^(?P<category>[\-\d\w]+)/(?P<year>[\d]{4})/(?P<month>[\d]+)/$',
        ArticleMonthArchive.as_view(), name='article-archive'),
]
