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
d49347e3
Commit
d49347e3
authored
Feb 17, 2015
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some pep8 cleanups
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
8fe9908b
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
26 additions
and
26 deletions
+26
-26
openshift/openshiftlibs.py
openshift/openshiftlibs.py
+2
-2
weblate/accounts/auth.py
weblate/accounts/auth.py
+2
-2
weblate/accounts/captcha.py
weblate/accounts/captcha.py
+2
-2
weblate/accounts/forms.py
weblate/accounts/forms.py
+2
-2
weblate/accounts/models.py
weblate/accounts/models.py
+4
-4
weblate/settings_example.py
weblate/settings_example.py
+2
-2
weblate/trans/tests/test_selenium.py
weblate/trans/tests/test_selenium.py
+3
-3
weblate/trans/views/edit.py
weblate/trans/views/edit.py
+6
-6
weblate/trans/views/files.py
weblate/trans/views/files.py
+3
-3
No files found.
openshift/openshiftlibs.py
View file @
d49347e3
...
...
@@ -77,8 +77,8 @@ def openshift_secure(default_keys, secure_function='make_secure_key'):
base
=
os
.
getenv
(
'OPENSHIFT_REPO_DIR'
)
calling_file
.
replace
(
base
,
''
)
sys
.
stderr
.
write
(
"OPENSHIFT WARNING: Using default values for secure variables, "
+
"please manually modify in "
+
calling_file
+
"
\
n
"
"OPENSHIFT WARNING: Using default values for secure variables, "
+
"please manually modify in "
+
calling_file
+
"
\
n
"
)
return
my_list
...
...
weblate/accounts/auth.py
View file @
d49347e3
...
...
@@ -82,6 +82,6 @@ def disable_anon_user_password_save(sender, **kwargs):
Blocks setting password for anonymous user.
'''
instance
=
kwargs
[
'instance'
]
if
(
instance
.
username
==
ANONYMOUS_USER_NAME
and
instance
.
has_usable_password
()):
if
(
instance
.
username
==
ANONYMOUS_USER_NAME
and
instance
.
has_usable_password
()):
raise
ValueError
(
'Anonymous user can not have usable password!'
)
weblate/accounts/captcha.py
View file @
d49347e3
...
...
@@ -101,8 +101,8 @@ class MathCaptcha(object):
Validates answer.
'''
return
(
self
.
result
==
answer
and
self
.
timestamp
+
TIMEDELTA
>
time
.
time
()
self
.
result
==
answer
and
self
.
timestamp
+
TIMEDELTA
>
time
.
time
()
)
@
property
...
...
weblate/accounts/forms.py
View file @
d49347e3
...
...
@@ -371,8 +371,8 @@ class CaptchaRegistrationForm(RegistrationForm):
'''
Validation for captcha.
'''
if (self.tampering
or
not self.captcha.validate(self.cleaned_data['
captcha
'])):
if (self.tampering
or
not self.captcha.validate(self.cleaned_data['
captcha
'])):
raise forms.ValidationError(
_('
Please
check
your
math
and
try
again
.
')
)
...
...
weblate/accounts/models.py
View file @
d49347e3
...
...
@@ -592,16 +592,16 @@ def post_login_handler(sender, request, user, **kwargs):
'''
# Warning about setting password
if
(
getattr
(
user
,
'backend'
,
''
)
==
'social.backends.email.EmailAuth'
and
not
user
.
has_usable_password
()):
if
(
getattr
(
user
,
'backend'
,
''
)
==
'social.backends.email.EmailAuth'
and
not
user
.
has_usable_password
()):
request
.
session
[
'show_set_password'
]
=
True
# Ensure user has a profile
profile
=
Profile
.
objects
.
get_or_create
(
user
=
user
)[
0
]
# Migrate django-registration based verification to python-social-auth
if
(
user
.
has_usable_password
()
and
not
user
.
social_auth
.
filter
(
provider
=
'email'
).
exists
()):
if
(
user
.
has_usable_password
()
and
not
user
.
social_auth
.
filter
(
provider
=
'email'
).
exists
()):
social
=
user
.
social_auth
.
create
(
provider
=
'email'
,
uid
=
user
.
email
,
...
...
weblate/settings_example.py
View file @
d49347e3
...
...
@@ -380,8 +380,8 @@ LOGGING = {
}
# Logging of management commands to console
if
(
os
.
environ
.
get
(
'DJANGO_IS_MANAGEMENT_COMMAND'
,
False
)
and
'console'
not
in
LOGGING
[
'loggers'
][
'weblate'
][
'handlers'
]):
if
(
os
.
environ
.
get
(
'DJANGO_IS_MANAGEMENT_COMMAND'
,
False
)
and
'console'
not
in
LOGGING
[
'loggers'
][
'weblate'
][
'handlers'
]):
LOGGING
[
'loggers'
][
'weblate'
][
'handlers'
].
append
(
'console'
)
# Remove syslog setup if it's not present
...
...
weblate/trans/tests/test_selenium.py
View file @
d49347e3
...
...
@@ -18,9 +18,9 @@ from weblate.trans.tests.test_views import RegistrationTestMixin
# Check whether we should run Selenium tests
DO_SELENIUM
=
(
(
'DO_SELENIUM'
in
os
.
environ
or
'CI_SELENIUM'
in
os
.
environ
)
and
'SAUCE_USERNAME'
in
os
.
environ
and
'SAUCE_ACCESS_KEY'
in
os
.
environ
(
'DO_SELENIUM'
in
os
.
environ
or
'CI_SELENIUM'
in
os
.
environ
)
and
'SAUCE_USERNAME'
in
os
.
environ
and
'SAUCE_ACCESS_KEY'
in
os
.
environ
)
...
...
weblate/trans/views/edit.py
View file @
d49347e3
...
...
@@ -296,8 +296,8 @@ def handle_translate(translation, request, user_locked,
request
,
_
(
'You don
\
'
t have privileges to save translations!'
)
)
elif
(
unit
.
only_vote_suggestions
()
and
not
request
.
user
.
has_perm
(
'trans.override_suggestion'
)):
elif
(
unit
.
only_vote_suggestions
()
and
not
request
.
user
.
has_perm
(
'trans.override_suggestion'
)):
messages
.
error
(
request
,
_
(
'Only suggestions are allowed in this translation!'
)
...
...
@@ -510,10 +510,10 @@ def translate(request, project, subproject, lang):
if
request
.
method
==
'POST'
and
not
project_locked
:
# Handle accepting/deleting suggestions
if
(
'accept'
not
in
request
.
POST
and
'delete'
not
in
request
.
POST
and
'upvote'
not
in
request
.
POST
and
'downvote'
not
in
request
.
POST
):
if
(
'accept'
not
in
request
.
POST
and
'delete'
not
in
request
.
POST
and
'upvote'
not
in
request
.
POST
and
'downvote'
not
in
request
.
POST
):
response
=
handle_translate
(
translation
,
request
,
user_locked
,
this_unit_url
,
next_unit_url
...
...
weblate/trans/views/files.py
View file @
d49347e3
...
...
@@ -93,9 +93,9 @@ def upload_translation(request, project, subproject, lang):
# Create author name
author
=
None
if
(
request
.
user
.
has_perm
(
'trans.author_translation'
)
and
form
.
cleaned_data
[
'author_name'
]
!=
''
and
form
.
cleaned_data
[
'author_email'
]
!=
''
):
if
(
request
.
user
.
has_perm
(
'trans.author_translation'
)
and
form
.
cleaned_data
[
'author_name'
]
!=
''
and
form
.
cleaned_data
[
'author_email'
]
!=
''
):
author
=
'%s <%s>'
%
(
form
.
cleaned_data
[
'author_name'
],
form
.
cleaned_data
[
'author_email'
]
...
...
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