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

Add API field for blog to the preprint provider model [OSF-7405] #6821

Conversation

erinspace
Copy link
Member

Purpose

Add field to preprint provider model to store a link to a blog, and include in the API preprint provider serializer.

screen shot 2017-02-03 at 3 13 55 pm

Changes

  • Migration to add blog field to model
  • Update to serializer to show blog
  • Update to view docs to explain blog

Side effects

Migration will need to be run for the changes to work properly

Ticket

https://openscience.atlassian.net/browse/OSF-7405

@@ -30,6 +30,7 @@ class PreprintProvider(ObjectIDMixin, BaseModel):
social_twitter = models.CharField(null=True, blank=True, max_length=200) # max length on prod: 8
social_facebook = models.CharField(null=True, blank=True, max_length=200) # max length on prod: 8
social_instagram = models.CharField(null=True, blank=True, max_length=200) # max length on prod: 8
blog = models.URLField(null=True, blank=True)
Copy link
Member

Choose a reason for hiding this comment

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

Consider renaming to blog_url, to better follow naming conventions for URLFields. Also, should this have a max_length?

Copy link
Member Author

Choose a reason for hiding this comment

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

URLField has a default max_length of 200, figured I'd not change it.

Copy link
Member

@mfraezz mfraezz left a comment

Choose a reason for hiding this comment

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

8165306002_3f55b57793

@erinspace erinspace force-pushed the feature/blog_api_field_preprint_provider branch from 71dcdbe to 8272fb9 Compare May 2, 2017 18:10
@erinspace
Copy link
Member Author

@erinspace erinspace closed this Jun 1, 2017
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.

None yet

2 participants