diff --git a/committees/urls.py b/committees/urls.py index 9f13732d..1c5da9ba 100644 --- a/committees/urls.py +++ b/committees/urls.py @@ -6,8 +6,8 @@ CommitteeListView, CommitteeDetailView, TopicListView, TopicsMoreView, TopicDetailView, delete_topic, delete_topic_rating, meeting_list_by_date, edit_topic, CommitteeMMMDocuments, UnpublishedProtocolslistView, FutureMeetingslistView) -from django.http.response import HttpResponse, Http404 -import os +# from django.http.response import HttpResponse, Http404 +# import os meetings_list = MeetingsListView.as_view() @@ -15,32 +15,33 @@ future_meetings_list = FutureMeetingslistView.as_view() -def static_committees_index_view(request): - filepath = "/oknesset_web/committees/dist/committees/index.html" - if os.path.exists(filepath): - with open(filepath) as f: - return HttpResponse(f.read()) - else: - return CommitteeListView.as_view()(request) - - -def static_committees_page_view(request, *args): - filepath = "/oknesset_web/committees/dist/{}".format(request.path) - if os.path.exists(filepath): - with open(filepath) as f: - return HttpResponse(f.read()) - else: - return Http404() +# def static_committees_index_view(request): +# filepath = "/oknesset_web/committees/dist/committees/index.html" +# if os.path.exists(filepath): +# with open(filepath) as f: +# return HttpResponse(f.read()) +# else: +# return CommitteeListView.as_view()(request) +# +# +# def static_committees_page_view(request, *args): +# filepath = "/oknesset_web/committees/dist/{}".format(request.path) +# if os.path.exists(filepath): +# with open(filepath) as f: +# return HttpResponse(f.read()) +# else: +# return Http404() committeesurlpatterns = patterns('', # static committee pages - url(r'^committee/$', static_committees_index_view, name='committee-list'), - url(r'^committees/knesset-(\d+).html', static_committees_page_view), - url(r'^committees/(\d+).html', static_committees_page_view), - url(r'^meetings/(\d+)/(\d+)/(\d+).html', static_committees_page_view), - url(r'^committees/index.html', static_committees_page_view), + # url(r'^committee/$', static_committees_index_view, name='committee-list'), + # url(r'^committees/knesset-(\d+).html', static_committees_page_view), + # url(r'^committees/(\d+).html', static_committees_page_view), + # url(r'^meetings/(\d+)/(\d+)/(\d+).html', static_committees_page_view), + # url(r'^committees/index.html', static_committees_page_view), + url(r'^committee/$', CommitteeListView.as_view(), name='committee-list'), url(r'^committee/more-topics/$', TopicsMoreView.as_view(), name='committee-topics-more'), url(r'^committee/(?P\d+)/$', CommitteeDetailView.as_view(),