Skip to content

Commit

Permalink
Revert "#164187822 Implement fix for image uploads for articles"
Browse files Browse the repository at this point in the history
  • Loading branch information
d-kahara committed Feb 23, 2019
1 parent 718ed70 commit 2985218
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion authors/apps/articles/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Article(models.Model):
title = models.CharField(max_length=200, blank=True)
body = models.TextField(blank=True)
description = models.CharField(max_length=50, blank=True)
images = models.URLField(blank=True, default='https://cdn0.iconfinder.com/data/icons/mtt-web-icons/139/article-512.png')
images = CloudinaryField(blank=True, default='No image', null=True)
created = models.DateTimeField(auto_now_add=True)
modified = models.DateTimeField(auto_now=True)
slug = models.SlugField(max_length=50, blank=False, unique=True)
Expand Down
2 changes: 1 addition & 1 deletion authors/apps/articles/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ArticleSerializer(TaggitSerializer, serializers.ModelSerializer):
# Field in the database corresponding to the User model
author = serializers.SerializerMethodField()
# Uploads an image to the Cloudinary servers
images = serializers.URLField(required=False)
images = serializers.ImageField(default=None)
tagList = TagListSerializerField()
user_id_likes = serializers.PrimaryKeyRelatedField(
many=True, read_only=True)
Expand Down

0 comments on commit 2985218

Please sign in to comment.