Example #1
0
 def get_context_data(self, **kwargs):
     context = super().get_context_data(**kwargs)
     context['posts'] = state.posts
     markdown_file = None
     page = self.request.path.split("/")[2]
     if page:
         markdown_file = f"posts/{page}"
     return create_page_context(context, FILE_PATH, markdown_file)
Example #2
0
 def get_context_data(self, **kwargs):
     context = super().get_context_data(**kwargs)
     return create_page_context(context, FILE_PATH)
Example #3
0
 def get_context_data(self, **kwargs):
     context = super().get_context_data(**kwargs)
     context['portfolio'] = state.portfolio
     return create_page_context(context, FILE_PATH)
Example #4
0
 def get_context_data(self, **kwargs):
     context = super().get_context_data(**kwargs)
     context['homepage'] = state.homepage
     context['portfolio'] = state.portfolio[:2]
     context['posts'] = state.posts
     return create_page_context(context, FILE_PATH)