Skip to content
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

Merged
merged 3 commits into from
Sep 25, 2017
Merged

Conversation

Pomax
Copy link
Contributor

@Pomax Pomax commented Sep 22, 2017

fixes #769

glyph = serializers.SerializerMethodField()

def get_glyph(self, instance):
print (settings.USE_S3)
Copy link
Contributor

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


Copy link
Contributor

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')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

url=settings.MEDIA_URL,
glyph=str(instance.glyph).replace(' ','%20')
)

Copy link
Contributor

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

@Pomax Pomax merged commit 48e8bf4 into master Sep 25, 2017
@Pomax Pomax deleted the full-glyph-path branch September 25, 2017 20:21
gvn added a commit that referenced this pull request Sep 26, 2017
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Return full URL for glyph values in News model
2 participants