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

@author: christian
"""
from django.conf.urls import *  # @UnusedWildImport
from django.views.generic import RedirectView
from .views import  DeleteGame, ListGames, ListPlayerGames, \
    ListRankings, GameForm


urlpatterns = patterns(
    'maistar_ranking.views',
    url('^$', ListRankings.as_view()),
    url(r'^event/(?P<event>[\d]+)/maistar/$', ListGames.as_view(), name="maistar-game-list"),
    url(r'^event/(?P<event>[\d]+)/maistar/add/$', GameForm.as_view(), name="maistar-add-game"),
    url(r'^maistar/(?P<game>[\d]+)/edit/$', GameForm.as_view(), name="maistar-edit-game"),
    url(r'^maistar/(?P<game>[\d]+)/delete/$', DeleteGame.as_view(), name="maistar-delete-game"),
    url(r'^maistar/$', ListRankings.as_view(), name="maistar-ranking"),
    url(r'^maistar/(?P<season>[\d]+)/$', ListRankings.as_view(), name="maistar-ranking"),
    url(r'^player/(?P<username>[\-\.\d\w]+)/maistar/$', ListPlayerGames.as_view(), name="maistar-player-games"),
    url(r'^player/(?P<username>[\-\.\d\w]+)/maistar/(?P<season>[\d]+)/$', ListPlayerGames.as_view(), name="maistar-player-games"),
)
