# Path: lifeblog/views.py
# class DocumentList(ListView):
#     queryset = Document
#     template_name = 'lifeblog/index.html'
# 
#     def get_context_data(self, **kwargs):
#         context = super(DocumentList, self).get_context_data(**kwargs)
#         context['test'] = settings.TEST
#         return context
# 
#     def get_queryset(self):
#         return Document.objects.filter(public_doc=True)
# 
# class DocumentDetail(DetailView):
#     model = Document
#     template_name = 'lifeblog/detail.html'
# 
#     def get_context_data(self, **kwargs):
#         context = super(DocumentDetail, self).get_context_data(**kwargs)
#         context['test'] = settings.TEST
#         return context


from django.conf.urls import url
from .views import DocumentList, DocumentDetail


urlpatterns = [
    url(r'^$', DocumentList.as_view(), name="lifeblog-index"),
    url(r'^(?P<pk>[0-9]+)/$',
        DocumentDetail.as_view(), name='lifeblog-document-detail'),

# Path: lifeblog/views.py
# class DocumentList(ListView):
#     queryset = Document
#     template_name = 'lifeblog/index.html'
# 
#     def get_context_data(self, **kwargs):
#         context = super(DocumentList, self).get_context_data(**kwargs)
#         context['test'] = settings.TEST
#         return context
# 
#     def get_queryset(self):
#         return Document.objects.filter(public_doc=True)
# 
# class DocumentDetail(DetailView):
#     model = Document
#     template_name = 'lifeblog/detail.html'
# 
#     def get_context_data(self, **kwargs):
#         context = super(DocumentDetail, self).get_context_data(**kwargs)
#         context['test'] = settings.TEST
#         return context


# Path: lifeblog/urls.py
from django.conf.urls import url
from .views import DocumentList, DocumentDetail



urlpatterns = [
    url(r'^$', DocumentList.as_view(), name="lifeblog-index"),
    url(r'^(?P<pk>[0-9]+)/$',
        DocumentDetail.as_view(), name='lifeblog-document-detail'),

]