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
ddeb27c8
Commit
ddeb27c8
authored
Aug 27, 2015
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cache avatars in client as well
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
8e23aa4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
weblate/accounts/views.py
weblate/accounts/views.py
+6
-1
No files found.
weblate/accounts/views.py
View file @
ddeb27c8
...
...
@@ -28,6 +28,7 @@ from django.utils.translation import ugettext as _
from
django.contrib.auth.decorators
import
login_required
from
django.core.mail.message
import
EmailMultiAlternatives
from
django.utils
import
translation
from
django.utils.cache
import
patch_response_headers
from
django.contrib.auth.models
import
User
from
django.contrib.auth
import
views
as
auth_views
from
django.views.generic
import
TemplateView
...
...
@@ -352,11 +353,15 @@ def user_avatar(request, user, size):
if
user
.
email
==
'noreply@weblate.org'
:
return
redirect
(
get_fallback_avatar_url
(
size
))
re
turn
HttpResponse
(
re
sponse
=
HttpResponse
(
content_type
=
'image/png'
,
content
=
get_avatar_image
(
user
,
size
)
)
patch_response_headers
(
response
,
3600
*
24
*
7
)
return
response
def
weblate_login
(
request
):
'''
...
...
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