Skip to content
Permalink
Browse files

Changes needed to use gitbored, mostly as documented here: https://gi…

  • Loading branch information
stnbu committed Sep 5, 2018
1 parent df5c215 commit 320f0552e7fdfb507e19784a3017c90f233e337e
Showing with 17 additions and 1 deletion.
  1. +9 −0 main/templates/main/index.html
  2. +8 −0 main/views.py
  3. +0 −1 oleo/urls.py
@@ -19,6 +19,10 @@
<meta charset="utf-8"/>
<title>Mike Burr</title>
<link rel="shortcut icon" href="{% static 'main/favicon.ico' %}">
{# this coordinated with "main/views.py". needs refactoring #}
{% if repos_list %}
<link rel="stylesheet" type="text/css" href="{% static 'gitbored/style.css' %}">
{% endif %}
<link rel="stylesheet" type="text/css" href="{% static 'main/style.css' %}">
</head>

@@ -57,6 +61,11 @@ <h2>{{ current_page.headline }}</h2>
</tr>
</table>

{# this coordinated with "main/views.py". needs refactoring #}
{% if repos_list %}
{# requres settings.TEMPLATES['APP_DIRS']==True #}
{% include "gitbored/index.html" %}
{% endif %}

</div> <!-- main -->

@@ -2,6 +2,8 @@
from django.http import HttpResponseRedirect
from .models import Page, Content

from gitbored.views import get_grouped_commits

def page(request, current_page_name):
pages = Page.objects.order_by('weight')
current_page = Page.objects.get(name=current_page_name)
@@ -11,4 +13,10 @@ def page(request, current_page_name):
'content': content,
'pages': pages,
}

# a one-off... TBD
if current_page_name == 'portfolio':
repos_list = get_grouped_commits()
context['repos_list'] = repos_list

return render(request, 'main/index.html', context)
@@ -7,7 +7,6 @@
path('favicon.ico', RedirectView.as_view(url='/static/main/favicon.ico')),
path('resume/', RedirectView.as_view(url='/static/main/bin/resume-mike-burr.html')),
path('', RedirectView.as_view(url='/pages/home/')),
path('gitbored/', include('gitbored.urls')),
path('pages/', include('main.urls')),
]

0 comments on commit 320f055

Please sign in to comment.