Commit 0df98f54 authored by Michal Čihař's avatar Michal Čihař

Add admin page with git repo status

parent 508dde77
{% extends "admin/base_site.html" %}
{% load i18n %}
{% block title %}{% trans "Status of repositories" %}{% endblock %}
{% block breadcrumbs %}
<div class="breadcrumbs"><a href="../">
{% trans "Home" %}</a> &rsaquo; {% trans "Status" %}
</div>{% endblock %}
{% block content %}
<div id="content-main">
<h1>{% trans "Status of repositories" %}</h1>
{% for sp in subprojects %}
<h3>{{ sp }}</h3>
<pre>
{{ sp.get_repo.git.status }}
</pre>
{% endfor %}
</div>
{% endblock %}
from trans.models import SubProject
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.contrib.admin.views.decorators import staff_member_required
@staff_member_required
def report(request):
return render_to_response("admin/report.html", RequestContext(request, {
'subprojects': SubProject.objects.all()
}))
......@@ -41,6 +41,7 @@ urlpatterns = patterns('',
# Admin interface
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/report/$', 'trans.admin_views.report'),
url(r'^admin/', include(admin.site.urls)),
# Auth
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment