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
e1dadcd0
Commit
e1dadcd0
authored
Apr 20, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
f02c2694
73f3bcf3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
10 deletions
+15
-10
docs/api.rst
docs/api.rst
+1
-1
docs/changes.rst
docs/changes.rst
+1
-0
weblate/html/index.html
weblate/html/index.html
+1
-1
weblate/trans/api.py
weblate/trans/api.py
+12
-8
No files found.
docs/api.rst
View file @
e1dadcd0
...
...
@@ -32,7 +32,7 @@ repository has been updated.
``git:/github.com/owner/repo.git``, otherwise automatic detection of used
repository will fail.
.. seealso:: http:/help.github.com/post-receive-hooks/
.. seealso:: http:/
/
help.github.com/post-receive-hooks/
Exports
-------
...
...
docs/changes.rst
View file @
e1dadcd0
...
...
@@ -8,6 +8,7 @@ Relased on ? 2012.
* Improved validation while adding/saving subproject.
* Experimental support for Android resource files (needs patched ttkit).
* Updates from hooks are run in background.
weblate 0.9
-----------
...
...
weblate/html/index.html
View file @
e1dadcd0
...
...
@@ -42,7 +42,7 @@
<h2>
{% trans "Summaries" %}
</h2>
<div
class=
"tabs"
>
<div
class=
"tabs"
id=
"main-tabs"
>
<ul>
<li><a
href=
"#changes"
>
{% trans "Recent changes" %}
</a></li>
...
...
weblate/trans/api.py
View file @
e1dadcd0
...
...
@@ -8,6 +8,7 @@ from weblate.trans.models import Project, SubProject
import
json
import
logging
import
threading
logger
=
logging
.
getLogger
(
'weblate'
)
...
...
@@ -19,8 +20,9 @@ def update_subproject(request, project, subproject):
if
not
settings
.
ENABLE_HOOKS
:
return
HttpResponseNotAllowed
([])
obj
=
get_object_or_404
(
SubProject
,
slug
=
subproject
,
project__slug
=
project
)
obj
.
do_update
()
return
HttpResponse
(
'updated'
)
t
=
threading
.
Thread
(
target
=
obj
.
do_update
)
t
.
start
()
return
HttpResponse
(
'update triggered'
)
@
csrf_exempt
def
update_project
(
request
,
project
):
...
...
@@ -30,8 +32,9 @@ def update_project(request, project):
if
not
settings
.
ENABLE_HOOKS
:
return
HttpResponseNotAllowed
([])
obj
=
get_object_or_404
(
Project
,
slug
=
project
)
obj
.
do_update
()
return
HttpResponse
(
'updated'
)
t
=
threading
.
Thread
(
target
=
obj
.
do_update
)
t
.
start
()
return
HttpResponse
(
'update triggered'
)
@
csrf_exempt
...
...
@@ -53,11 +56,12 @@ def github_hook(request):
)
branch
=
data
[
'ref'
].
split
(
'/'
)[
-
1
]
logger
.
info
(
'received GitHub notification on repository %s, branch %s'
,
repo
,
branch
)
for
s
in
SubProject
.
objects
.
filter
(
repo
=
repo
,
branch
=
branch
):
logger
.
info
(
'GitHub notification will update %s'
,
s
)
s
.
do_update
()
for
obj
in
SubProject
.
objects
.
filter
(
repo
=
repo
,
branch
=
branch
):
logger
.
info
(
'GitHub notification will update %s'
,
obj
)
t
=
threading
.
Thread
(
target
=
obj
.
do_update
)
t
.
start
()
return
HttpResponse
(
'updated'
)
return
HttpResponse
(
'update
triggere
d'
)
def
dt_handler
(
obj
):
if
hasattr
(
obj
,
'isoformat'
):
...
...
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