Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
f9c0313e
Verified
Commit
f9c0313e
authored
May 31, 2017
by
Sébastiaan Versteeg
Browse files
Fix absolute uri to default-avatar
parent
4ff2db65
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/members/api/serializers.py
View file @
f9c0313e
from
base64
import
b64encode
from
django.contrib.staticfiles.finders
import
find
as
find_static_file
from
django.templatetags.static
import
static
from
django.urls
import
reverse
from
rest_framework
import
serializers
...
...
@@ -100,4 +101,4 @@ class MemberListSerializer(serializers.ModelSerializer):
'%s%s'
%
(
settings
.
MEDIA_URL
,
instance
.
photo
))
else
:
return
self
.
context
[
'request'
].
build_absolute_uri
(
'members/images/default-avatar.jpg'
)
static
(
'members/images/default-avatar.jpg'
)
)
Write
Preview
Supports
Markdown
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