Skip to content

Commit

Permalink
Merge d6661a7 into c793dfc
Browse files Browse the repository at this point in the history
  • Loading branch information
erinspace committed Feb 3, 2017
2 parents c793dfc + d6661a7 commit 0d88cfe
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/preprint_providers/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class PreprintProviderSerializer(JSONAPISerializer):
subjects_acceptable = ser.JSONField(required=False, allow_null=True)
logo_path = ser.CharField(read_only=True)
banner_path = ser.CharField(read_only=True)
blog = ser.URLField(required=False, allow_null=True)

preprints = RelationshipField(
related_view='preprint_providers:preprints-list',
Expand Down
2 changes: 2 additions & 0 deletions api/preprint_providers/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class PreprintProviderList(JSONAPIBaseView, generics.ListAPIView, ODMFilterMixin
logo_path string a path to the preprint provider's static logo
banner_path string a path to the preprint provider's banner
description string description of the preprint provider
blog string link to the preprint provider's blog
##Relationships
Expand Down Expand Up @@ -88,6 +89,7 @@ class PreprintProviderDetail(JSONAPIBaseView, generics.RetrieveAPIView):
logo_path string a path to the preprint provider's static logo
banner_path string a path to the preprint provider's banner
description string description of the preprint provider
blog string link to the preprint provider's blog
##Relationships
Expand Down
20 changes: 20 additions & 0 deletions osf/migrations/0032_preprintprovider_blog.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-02-03 20:05
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('osf', '0031_auto_20170202_0943'),
]

operations = [
migrations.AddField(
model_name='preprintprovider',
name='blog',
field=models.URLField(blank=True, null=True),
),
]
1 change: 1 addition & 0 deletions osf/models/preprint_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

subjects_acceptable = DateTimeAwareJSONField(blank=True, default=list)
licenses_acceptable = models.ManyToManyField(NodeLicense, blank=True)
Expand Down

0 comments on commit 0d88cfe

Please sign in to comment.