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
b5dbeba1
Commit
b5dbeba1
authored
Sep 20, 2012
by
Weblate
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
d0e257a5
4215ee99
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
76 additions
and
0 deletions
+76
-0
docs/admin.rst
docs/admin.rst
+20
-0
weblate/html/admin/custom-index.html
weblate/html/admin/custom-index.html
+9
-0
weblate/html/admin/ssh.html
weblate/html/admin/ssh.html
+22
-0
weblate/trans/admin_views.py
weblate/trans/admin_views.py
+24
-0
weblate/urls.py
weblate/urls.py
+1
-0
No files found.
docs/admin.rst
View file @
b5dbeba1
...
...
@@ -118,6 +118,24 @@ at once. This can be achieved using :djadmin:`import_project`.
First you need to create project which will contain all subprojects and then
it's just a matter of running :djadmin:`import_project`.
.. _private:
Accessing private repositories
------------------------------
In case you want Weblate to access private repository it needs to get to it
somehow. Most frequently used method here is based on SSH. To have access to
such repository, you generate SSH key for Weblate and authorize it to access
the repository.
You can generate or display key currently used by Weblate in the admin
interface (follow :guilabel:`SSH keys` link on main admin page).
.. note::
The keys need to be without password to make it work, so be sure they are
well protected against malicious usage.
.. seealso:: :ref:`manage`
Updating repositories
...
...
@@ -167,6 +185,8 @@ first, otherwise push will fail.
You can also enable automatic pushing changes on commit, this can be done in
project configuration.
.. seealso:: :ref:`private` for setting up SSH keys
.. _merge-rebase:
Merge or rebase
...
...
weblate/html/admin/custom-index.html
View file @
b5dbeba1
...
...
@@ -18,6 +18,15 @@
</tr>
<tr>
<th
scope=
"row"
><a
href=
"ssh/"
>
{% trans "SSH keys" %}
</a></th>
<th></th>
<th></th>
</tr>
</table>
</div>
...
...
weblate/html/admin/ssh.html
0 → 100644
View file @
b5dbeba1
{% extends "admin/base_site.html" %}
{% load i18n %}
{% block title %}{% trans "SSH keys" %}{% endblock %}
{% block breadcrumbs %}
<div
class=
"breadcrumbs"
><a
href=
"../"
>
{% trans "Home" %}
</a>
›
{% trans "SSH" %}
</div>
{% endblock %}
{% block content %}
<div
id=
"content-main"
>
{% if public_key %}
<h1>
{% trans "Public SSH key" %}
</h1>
<p>
{% trans "Weblate currently uses following SSH key:" %}
</p>
<textarea
style=
"width:100%"
>
{{ public_key.key }}
</textarea>
{% endif %}
<p>
{% blocktrans %}You can find more information about setting up SSH keys in
<a
href=
"{{ ssh_docs }}"
>
the Weblate manual
</a>
.{% endblocktrans %}
</p>
</div>
{% endblock %}
weblate/trans/admin_views.py
View file @
b5dbeba1
...
...
@@ -22,9 +22,33 @@ from weblate.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
import
weblate
import
os
@
staff_member_required
def
report
(
request
):
return
render_to_response
(
"admin/report.html"
,
RequestContext
(
request
,
{
'subprojects'
:
SubProject
.
objects
.
all
()
}))
@
staff_member_required
def
ssh
(
request
):
key_path
=
os
.
path
.
expanduser
(
'~/.ssh/id_rsa.pub'
)
if
os
.
path
.
exists
(
key_path
):
key_data
=
file
(
key_path
).
read
()
key_type
,
key_fingerprint
,
key_id
=
key_data
.
strip
().
split
()
key
=
{
'key'
:
key_data
,
'type'
:
key_type
,
'fingerprint'
:
key_fingerprint
,
'id'
:
key_id
,
}
else
:
key
=
None
return
render_to_response
(
"admin/ssh.html"
,
RequestContext
(
request
,
{
'public_key'
:
key
,
'ssh_docs'
:
'http://weblate.readthedocs.org/en/weblate-%s/admin.html#private'
%
weblate
.
VERSION
,
}))
weblate/urls.py
View file @
b5dbeba1
...
...
@@ -115,6 +115,7 @@ urlpatterns = patterns('',
# Admin interface
url
(
r'^admin/doc/'
,
include
(
'django.contrib.admindocs.urls'
)),
url
(
r'^admin/report/$'
,
'weblate.trans.admin_views.report'
),
url
(
r'^admin/ssh/$'
,
'weblate.trans.admin_views.ssh'
),
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