from django.conf import settings
from django.conf.urls.defaults import *
from almanac.models import *
from almanac import views as al_views

# custom views stories
urlpatterns = patterns(
    "almanac.views",
    url(r"^$", view=al_views.index, name="al-index"),
    url(r"^tides/$", view=al_views.tide_index, name="al-tide-index"),
    # Day tide would feature a graph showing the highs and lows plus the previous day and the next day
    url(
        r"^tides/(?P<slug>[\-\d\w]+)/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/",
        view=al_views.tide_week_detail,
        name="al-week-detail",
    ),
    # Month tide would have a list of days with tides
    url(
        r"^tides/(?P<slug>[\-\d\w]+)/(?P<year>\d{4})/(?P<month>[a-z]{3})/$",
        view=al_views.tide_month_detail,
        name="al-month-detail",
    ),
    # Year tide would have a month display
    url(
        r"^tides/(?P<slug>[\-\d\w]+)/(?P<year>\d{4})/$",
        view=al_views.tide_year_detail,
        name="al-tide-year-detail",
    ),
    # Weekly CSV dumps
    url(
        r"^tides/(?P<slug>[\-\d\w]+)-(?P<year>\d{4})-(?P<month>[a-z]{3})-(?P<day>\w{1,2}).csv",
        view=al_views.weekly_dump,
        name="al-weekly-dump",
    ),
    url(
        r"^tides/(?P<slug>[\-\d\w]+)-(?P<year>\d{4})(?P<month>[a-z]{3})(?P<day>\w{1,2}).sg",
        view=al_views.seasonal_guide,
        name="al-seasonal-guide",
    ),
    url(
        r"^tides/(?P<slug>[\-\d\w]+)-(?P<year>\d{4})(?P<month>[a-z]{3})(?P<day>\w{1,2}).pdf",
        view=al_views.seasonal_guide_pdf,
        name="al-seasonal-pdf",
    ),
)
