
from django.urls import path, re_path
from django.views.generic import RedirectView, TemplateView

from blog import views
from blog.feeds import LatestArticlesFeed

urlpatterns = [

	path('', views.blog_index, {'bcat': "index",}, name='blog_index'),

	# Flux RSS
	path('feed/', LatestArticlesFeed(), name='blog_rss_feed'),

	path('update', views.blog_update, name='blog_update'),

	re_path(r'cat/(?P<bcat>[a-zA-Z0-9_.,-]+)$', views.blog_index, name='blog_cat'),
	re_path(r'category/(?P<bcat>[a-zA-Z0-9_.,-]+)/$', RedirectView.as_view(url='/blog/cat/%(bcat)s')),

	re_path(r'tag/(?P<bcat>[a-zA-Z0-9_.,-]+)$', views.blog_index, name='blog_tag'),
	re_path(r'tag/(?P<bcat>[a-zA-Z0-9_.,-]+)/$', views.blog_index, name='blog_tag_ext'),

	re_path(r'(?P<bart>[a-zA-Z0-9_.,-]+)$', views.blog_play, name='blog_play'),
	re_path(r'(?P<bart>[a-zA-Z0-9_.,-]+)/$', views.blog_play, name='blog_play_ext'),

	
]
