diff --git a/api/preprint_providers/serializers.py b/api/preprint_providers/serializers.py index d314cbf2f1a1..78108179b64c 100644 --- a/api/preprint_providers/serializers.py +++ b/api/preprint_providers/serializers.py @@ -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', diff --git a/api/preprint_providers/views.py b/api/preprint_providers/views.py index 0a8e6de96019..47cb2013715b 100644 --- a/api/preprint_providers/views.py +++ b/api/preprint_providers/views.py @@ -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 @@ -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 diff --git a/osf/migrations/0032_preprintprovider_blog.py b/osf/migrations/0032_preprintprovider_blog.py new file mode 100644 index 000000000000..33979c55f157 --- /dev/null +++ b/osf/migrations/0032_preprintprovider_blog.py @@ -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), + ), + ] diff --git a/osf/models/preprint_provider.py b/osf/models/preprint_provider.py index 7feeccb82e98..54f236450bed 100644 --- a/osf/models/preprint_provider.py +++ b/osf/models/preprint_provider.py @@ -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)