Permalink
Browse files

Fixed weird sorting/truncation problem, link in README.md

  • Loading branch information...
stnbu committed Sep 3, 2018
1 parent 9176894 commit 1343d0cb3ac3f2c4a05eb9f892014bedfc1b6a28
Showing with 4 additions and 1 deletion.
  1. +2 −0 README.md
  2. +2 −1 gitbored/views.py
@@ -5,4 +5,6 @@ This is a very simple Django app for displaying recent, personal GitHub activity
A daemon that fetches and stores data locally is included.
You can see it in action here: https://unintuitive.org/gitbored/
Mike Burr <mburr@unintuitive.org>
@@ -7,7 +7,8 @@ def index(request):
repos = Repos.objects.order_by('-updated_at')
repos_ = []
for repo in repos:
commits = Commits.objects.filter(repo=repo.name)[:5]
commits = Commits.objects.filter(repo=repo.name)
commits = list(reversed(commits))[:10]
try:
blurb = Blurbs.objects.get(repo_id=repo.id).blurb
except Blurbs.DoesNotExist: # what is the right way...?

0 comments on commit 1343d0c

Please sign in to comment.