Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
0df98f54
Commit
0df98f54
authored
Mar 21, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add admin page with git repo status
parent
508dde77
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
0 deletions
+32
-0
html/admin/report.html
html/admin/report.html
+21
-0
trans/admin_views.py
trans/admin_views.py
+10
-0
urls.py
urls.py
+1
-0
No files found.
html/admin/report.html
0 → 100644
View file @
0df98f54
{% extends "admin/base_site.html" %}
{% load i18n %}
{% block title %}{% trans "Status of repositories" %}{% endblock %}
{% block breadcrumbs %}
<div
class=
"breadcrumbs"
><a
href=
"../"
>
{% trans "Home" %}
</a>
›
{% 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 %}
trans/admin_views.py
0 → 100644
View file @
0df98f54
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
()
}))
urls.py
View file @
0df98f54
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment