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
60f18746
Commit
60f18746
authored
Jan 27, 2016
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unlock translations on logout
Fixes #983 Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
b4e3c271
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
weblate/accounts/models.py
weblate/accounts/models.py
+8
-1
No files found.
weblate/accounts/models.py
View file @
60f18746
...
...
@@ -27,7 +27,7 @@ from smtplib import SMTPException
from
django.db
import
models
from
django.dispatch
import
receiver
from
django.conf
import
settings
from
django.contrib.auth.signals
import
user_logged_in
from
django.contrib.auth.signals
import
user_logged_in
,
user_logged_out
from
django.db.models.signals
import
post_save
,
post_migrate
from
django.utils.translation
import
ugettext_lazy
as
_
from
django.utils.encoding
import
python_2_unicode_compatible
,
force_text
...
...
@@ -735,6 +735,13 @@ def post_login_handler(sender, request, user, **kwargs):
set_lang
(
request
,
profile
)
@
receiver
(
user_logged_out
)
def
post_logout_handler
(
sender
,
request
,
user
,
**
kwargs
):
# Unlock translations on logout
for
translation
in
user
.
translation_set
.
all
():
translation
.
create_lock
(
None
)
def
create_groups
(
update
):
'''
Creates standard groups and gives them permissions.
...
...
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