Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fixed weird sorting/truncation problem, link in README.md
- Loading branch information
Showing
with
4 additions
and
1 deletion.
-
+2
−0
README.md
-
+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...? |
|
|