codereview/dashboard/views.py

15 lines
498 B
Python
Raw Permalink Normal View History

2010-11-19 05:12:29 +00:00
from django.shortcuts import render_to_response
2010-12-08 22:01:09 +00:00
from django.template import RequestContext
from django.contrib.auth.decorators import permission_required
2010-11-19 05:12:29 +00:00
from codereview.dashboard.models import Repository
@permission_required('dashboard.browse')
2010-11-19 05:12:29 +00:00
def index(request):
""" List available repositories
"""
repositories = Repository.objects.all()
2010-12-08 22:01:09 +00:00
data = RequestContext(request, {
'repositories': repositories,
})
return render_to_response('dashboard/index.html', data)