# -*- coding: UTF-8 -*-

from django.conf.urls import patterns, url
from jukebox.jukebox_core.models import QueueFeed
from django.contrib.auth.views import login, logout
import views

js_info_dict = {
    'packages': (
        'jukebox_web',
    ),
}

urlpatterns = patterns("",
    url(r"^$", views.index, name="jukebox_web_index"),
    url(r"^login$", login, name="jukebox_web_login"),
    url(r"^index$", views.index, name="jukebox_web_index"),
    url(r"^register$", views.register, name="jukebox_web_registration"),
    url(r"^login/error$", views.login_error, name="jukebox_web_login_error"),
    url(
        r"^language/set/(?P<language>[a-z]{2})",
        views.language,
        name="jukebox_web_language"
    ),
    url(r"^logout$", logout, {'next_page': '/'}),
    url(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),

     # RSS feed url
    (r'^feed/$', QueueFeed()),
)
