# Path: legislature/views.py
# STOPWORDS = frozenset([
#     # nltk.corpus.stopwords.words('english')
#     'i', 'me', 'my', 'myself', 'we', 'our', 'ours', 'ourselves', 'you', 'your',
#     'yours', 'yourself', 'yourselves', 'he', 'him', 'his', 'himself', 'she', 'her',
#     'hers', 'herself', 'it', 'its', 'itself', 'they', 'them', 'their', 'theirs',
#     'themselves', 'what', 'which', 'who', 'whom', 'this', 'that', 'these', 'those',
#     'am', 'is', 'are', 'was', 'were', 'be', 'been', 'being', 'have', 'has', 'had',
#     'having', 'do', 'does', 'did', 'doing', 'a', 'an', 'the', 'and', 'but', 'if',
#     'or', 'because', 'as', 'until', 'while', 'of', 'at', 'by', 'for', 'with',
#     'about', 'against', 'between', 'into', 'through', 'during', 'before', 'after',
#     'above', 'below', 'to', 'from', 'up', 'down', 'in', 'out', 'on', 'off', 'over',
#     'under', 'again', 'further', 'then', 'once', 'here', 'there', 'when', 'where',
#     'why', 'how', 'all', 'any', 'both', 'each', 'few', 'more', 'most', 'other',
#     'some', 'such', 'no', 'nor', 'not', 'only', 'own', 'same', 'so', 'than', 'too',
#     'very', 's', 't', 'can', 'will', 'just', 'don', 'should', 'now',
#     # @see https://github.com/rhymeswithcycle/openparliament/blob/master/parliament/text_analysis/frequencymodel.py
#     "it's", "we're", "we'll", "they're", "can't", "won't", "isn't", "don't", "he's",
#     "she's", "i'm", "aren't", "government", "house", "committee", "would", "speaker",
#     "motion", "mr", "mrs", "ms", "member", "minister", "canada", "members", "time",
#     "prime", "one", "parliament", "us", "bill", "act", "like", "canadians", "people",
#     "said", "want", "could", "issue", "today", "hon", "order", "party", "canadian",
#     "think", "also", "new", "get", "many", "say", "look", "country", "legislation",
#     "law", "department", "two", "day", "days", "madam", "must", "that's", "okay",
#     "thank", "really", "much", "there's", "yes", "no",
#     # HTML tags
#     'sup',
#     # Nova Scotia
#     "nova", "scotia", "scotians", "province", "honourable", "premier",
#     # artifacts
#     "\ufffd", "n't",
# ])
# def home(request):
# def about(request):
# def donate(request):
# def volunteer(request):
#     def get_context_data(self, **kwargs):
#     def get_context_data(self, **kwargs):
#     def get_queryset(self):
#     def get_context_data(self, **kwargs):
#     def get_queryset(self):
#     def get_context_data(self, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def search(self):
#     def __init__(self, *args, **kwargs):
#     def build_form(self, *args, **kwargs):
#     def extra_context(self):
# class TitleAdder(object):
# class DebateArchiveIndexView(ArchiveIndexView):
# class DebateYearArchiveView(TitleAdder, YearArchiveView):
# class DebateMonthArchiveView(TitleAdder, MonthArchiveView):
# class SpeakerListView(ListView):
# class SpeakerDetailView(ListView):
# class DebateDetailView(ListView):
# class BillListView(ListView):
# class BillDetailView(DetailView):
# class SpeechForm(SearchForm):
# class CustomSearchView(SearchView):


from django.conf.urls import patterns, url
from django.views.decorators.cache import cache_page
from legislature import views


urlpatterns = patterns('',
    url(r'^$', views.home, name='home'),
    url(r'^about/$', views.about, name='about'),
    url(r'^about/donate/$', views.donate, name='donate'),
    url(r'^about/volunteer/$', views.volunteer, name='volunteer'),
    url(r'^people/$', views.people, name='speaker-list'),
    url(r'^people/(?P<slug>[-_\w]+)/$', views.person, name='speaker-view'),
    url(r'^people/(?P<slug>[-_\w]+)/notices/$', views.person_notices, name='speaker-view-notices'),
    url(r'^debates/$', views.debates, name='section-list'),
    url(r'^debates/(?P<year>\d{4})/$', views.debates_by_year, name='section-list-by-year'),
    url(r'^debates/(?P<year>\d{4})/(?P<month>\d{1,2})/$', views.debates_by_month, name='section-list-by-month'),
    # It's possible for two hansards to have the same date, so we use slugs.
    url(r'^debates/(?P<slug>\D[-_\w]+)/$', views.debate, name='section-view'),
    url(r'^written-notices/(?P<slug>\D[-_\w]+)/$', views.notices, name='notices-view'),
    # OpenParliament.ca uses a `sequence` field to determine the page on which
    # the speech appers. SayIt lists all speeches in a section. Until SayIt adds
    # a `sequence` field to the Speech model, we put all speeches on one page
    # when linking to a speech.
    url(r'^debates/(?P<slug>\D[-_\w]+)/single-page/$', views.debate_single_page, name='section-view-single-page'),
    url(r'^written-notices/(?P<slug>\D[-_\w]+)/single-page/$', views.notices_single_page, name='notices-view-single-page'),
    url(r'^bills/$', cache_page(86400)(views.bills), name='bill-list'),

# Path: legislature/views.py
# STOPWORDS = frozenset([
#     # nltk.corpus.stopwords.words('english')
#     'i', 'me', 'my', 'myself', 'we', 'our', 'ours', 'ourselves', 'you', 'your',
#     'yours', 'yourself', 'yourselves', 'he', 'him', 'his', 'himself', 'she', 'her',
#     'hers', 'herself', 'it', 'its', 'itself', 'they', 'them', 'their', 'theirs',
#     'themselves', 'what', 'which', 'who', 'whom', 'this', 'that', 'these', 'those',
#     'am', 'is', 'are', 'was', 'were', 'be', 'been', 'being', 'have', 'has', 'had',
#     'having', 'do', 'does', 'did', 'doing', 'a', 'an', 'the', 'and', 'but', 'if',
#     'or', 'because', 'as', 'until', 'while', 'of', 'at', 'by', 'for', 'with',
#     'about', 'against', 'between', 'into', 'through', 'during', 'before', 'after',
#     'above', 'below', 'to', 'from', 'up', 'down', 'in', 'out', 'on', 'off', 'over',
#     'under', 'again', 'further', 'then', 'once', 'here', 'there', 'when', 'where',
#     'why', 'how', 'all', 'any', 'both', 'each', 'few', 'more', 'most', 'other',
#     'some', 'such', 'no', 'nor', 'not', 'only', 'own', 'same', 'so', 'than', 'too',
#     'very', 's', 't', 'can', 'will', 'just', 'don', 'should', 'now',
#     # @see https://github.com/rhymeswithcycle/openparliament/blob/master/parliament/text_analysis/frequencymodel.py
#     "it's", "we're", "we'll", "they're", "can't", "won't", "isn't", "don't", "he's",
#     "she's", "i'm", "aren't", "government", "house", "committee", "would", "speaker",
#     "motion", "mr", "mrs", "ms", "member", "minister", "canada", "members", "time",
#     "prime", "one", "parliament", "us", "bill", "act", "like", "canadians", "people",
#     "said", "want", "could", "issue", "today", "hon", "order", "party", "canadian",
#     "think", "also", "new", "get", "many", "say", "look", "country", "legislation",
#     "law", "department", "two", "day", "days", "madam", "must", "that's", "okay",
#     "thank", "really", "much", "there's", "yes", "no",
#     # HTML tags
#     'sup',
#     # Nova Scotia
#     "nova", "scotia", "scotians", "province", "honourable", "premier",
#     # artifacts
#     "\ufffd", "n't",
# ])
# def home(request):
# def about(request):
# def donate(request):
# def volunteer(request):
#     def get_context_data(self, **kwargs):
#     def get_context_data(self, **kwargs):
#     def get_queryset(self):
#     def get_context_data(self, **kwargs):
#     def get_queryset(self):
#     def get_context_data(self, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def search(self):
#     def __init__(self, *args, **kwargs):
#     def build_form(self, *args, **kwargs):
#     def extra_context(self):
# class TitleAdder(object):
# class DebateArchiveIndexView(ArchiveIndexView):
# class DebateYearArchiveView(TitleAdder, YearArchiveView):
# class DebateMonthArchiveView(TitleAdder, MonthArchiveView):
# class SpeakerListView(ListView):
# class SpeakerDetailView(ListView):
# class DebateDetailView(ListView):
# class BillListView(ListView):
# class BillDetailView(DetailView):
# class SpeechForm(SearchForm):
# class CustomSearchView(SearchView):


# Path: legislature/urls.py
from django.conf.urls import patterns, url
from django.views.decorators.cache import cache_page
from legislature import views



urlpatterns = patterns('',
    url(r'^$', views.home, name='home'),
    url(r'^about/$', views.about, name='about'),
    url(r'^about/donate/$', views.donate, name='donate'),
    url(r'^about/volunteer/$', views.volunteer, name='volunteer'),
    url(r'^people/$', views.people, name='speaker-list'),
    url(r'^people/(?P<slug>[-_\w]+)/$', views.person, name='speaker-view'),
    url(r'^people/(?P<slug>[-_\w]+)/notices/$', views.person_notices, name='speaker-view-notices'),
    url(r'^debates/$', views.debates, name='section-list'),
    url(r'^debates/(?P<year>\d{4})/$', views.debates_by_year, name='section-list-by-year'),
    url(r'^debates/(?P<year>\d{4})/(?P<month>\d{1,2})/$', views.debates_by_month, name='section-list-by-month'),
    # It's possible for two hansards to have the same date, so we use slugs.
    url(r'^debates/(?P<slug>\D[-_\w]+)/$', views.debate, name='section-view'),
    url(r'^written-notices/(?P<slug>\D[-_\w]+)/$', views.notices, name='notices-view'),
    # OpenParliament.ca uses a `sequence` field to determine the page on which
    # the speech appers. SayIt lists all speeches in a section. Until SayIt adds
    # a `sequence` field to the Speech model, we put all speeches on one page
    # when linking to a speech.
    url(r'^debates/(?P<slug>\D[-_\w]+)/single-page/$', views.debate_single_page, name='section-view-single-page'),
    url(r'^written-notices/(?P<slug>\D[-_\w]+)/single-page/$', views.notices_single_page, name='notices-view-single-page'),
    url(r'^bills/$', cache_page(86400)(views.bills), name='bill-list'),

    url(r'^bills/(?P<slug>[-_\w.]+)/$', cache_page(86400)(views.bill), name='bill-view'),