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
|
2010-12-08 22:04:26 +00:00
|
|
|
from django.contrib.auth.decorators import permission_required
|
2010-11-19 05:12:29 +00:00
|
|
|
from codereview.dashboard.models import Repository
|
|
|
|
|
2010-12-08 22:04:26 +00:00
|
|
|
@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)
|