-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updated the serializer to yield a full glyph path #784
Conversation
glyph = serializers.SerializerMethodField() | ||
|
||
def get_glyph(self, instance): | ||
print (settings.USE_S3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover print
from networkapi.news.models import News | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flake8 might complain about this
protocol='https' if request.is_secure() else 'http', | ||
root=request.META['HTTP_HOST'], | ||
url=settings.MEDIA_URL, | ||
glyph=str(instance.glyph).replace(' ','%20') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: might wanna try https://docs.python.org/3.6/library/urllib.parse.html#urllib.parse.quote instead
url=settings.MEDIA_URL, | ||
glyph=str(instance.glyph).replace(' ','%20') | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it's 1 blank line for nested classes. But personally don't mind as long as flake8 doesn't complain
* Reactify Homepage (#768) * reactifying homepage * only fetch homepage data for homepage * fixups * guarding against null data * switching People over to XHRd React component (#778) * reactifying Upcoming (#779) * reactifying Upcoming * better name * removing unused test * updated the serializer to yield a full glyph path (#784) * updated the serializer to yield a full glyph path * add the AWS location to the absolute glyph URL (#788) * updated svg - error image (#789) * Add related model name to hompepage admin header (#772) * reactifying News (#785) * reactifying News * adding key props * removing news json injection
fixes #769