#from django.conf.urls import url
from django.urls import re_path as url

from . import views
from django.views.i18n import JavaScriptCatalog


urlpatterns = [
	url(r'^$', views.index, name='index'),
#	url(r'^logout-view/$', views.logout, name='logout-view'),
	url(r'^status/$', views.status, name='status'),

	url(r'^js/jsi18n/$', JavaScriptCatalog.as_view(), name='jsi18n'),

	url(r'^publishers/$', views.publisherList, name='publishers-list'),
	url(r'^publishers/(?P<type>\w+)$', views.publisherList, name='publishers-list'),
	url(r'^news/details/(?P<newsId>\w+)/$', views.newsDetails, name='news-details'),
	url(r'^news/$', views.newsList, name='news-list'),

	url(r'^ws/news/$', views.wsNewsListTable, name='ws-news-list'),
	url(r'^ws/jsonnews/$', views.wsNewsList2, name='ws-news-list2'),
	url(r'^ws/graphs/$', views.wsGraphs, name='ws-graphs'),
	url(r'^ws/download/$', views.wsDownloadNews, name='ws-download-news'),
	url(r'^ws/searches/$', views.wsSearchList, name='ws-search-list'),
	url(r'^ws/playlist/(?P<publisher>\w+)/(?P<start>\w+)/(?P<end>\w+)/$', views.wsAudioList, name='ws-audio-list'),
	url(r'^ws/wordcloud/(?P<newsId>\w+)/$', views.wsWordCloud, name='ws-wordcloud'),
	url(r'^ws/suggestions/(?P<newsId>\w+)/$', views.wsSuggestions, name='ws-suggestions'),
	url(r'^api/download/$', views.apiDownloadNews, name='api-download-news'),

	url(r'^audio/$', views.audioList, name='audio'),
	url(r'^audio/(?P<publisher>\w+)$', views.audioPublisher, name='audio'),
	url(r'^audioplayer/(?P<publisher>\w+)/(?P<start>\w+)/(?P<end>\w+)/$', views.audioPlayerTest, name='audioPlayerTest'),

	url(r'^streaming/(?P<publisher>\w+)/(?P<time>\w+)/$', views.fileStreaming, name='fileStreaming'),
	url(r'^streaming/(?P<publisher>\w+)/(?P<start>\w+)/(?P<end>\w+)/$', views.listStreaming,  name='listStreaming'),


	url(r'^settings/$', views.settingsView, name='settings'),
	url(r'^settings/profile$', views.settingsView, name='settings-profile'),
	url(r'^settings/subscriptions$', views.settingsView, name='settings-subscriptions'),
	url(r'^settings/password$', views.settingsView, name='settings-password'),
	url(r'^settings/searches$', views.settingsSearches, name='settings-search'),
	url(r'^settings/apikey$', views.settingsApiKey, name='api-key'),
]


