mirror of
https://github.com/correl/codereview.git
synced 2024-12-28 19:19:16 +00:00
17 lines
626 B
Python
Executable file
17 lines
626 B
Python
Executable file
from django.shortcuts import render_to_response
|
|
from django.template import RequestContext
|
|
from django.contrib.auth.decorators import permission_required
|
|
from codereview.dashboard.models import Repository
|
|
from codereview.review.models import Review
|
|
|
|
@permission_required('dashboard.browse')
|
|
def index(request):
|
|
""" List available repositories
|
|
"""
|
|
repositories = Repository.objects.all()
|
|
reviews = Review.objects.all().order_by('-created')
|
|
data = RequestContext(request, {
|
|
'repositories': repositories,
|
|
'reviews': reviews,
|
|
})
|
|
return render_to_response('dashboard/index.html', data)
|