Skip to content

Commit

Permalink
Merge pull request #31 from andela/bg-image-path-type-164105567
Browse files Browse the repository at this point in the history
#164105567 Change image path type in article model
  • Loading branch information
Betty-Kebenei committed Feb 21, 2019
2 parents 9b0bbf4 + bd58438 commit 510b467
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion authors/apps/articles/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Article(models.Model):
"""
Each Article model schema
"""
image_path = CloudinaryField(blank=True, null=True)
image_path = models.CharField(max_length=255, blank=True, null=True)
slug = models.SlugField(max_length=255)
title = models.CharField(db_index=True, max_length=255)
body = models.CharField(db_index=True, max_length=8055)
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 @@ -26,7 +26,7 @@ class ArticleSerializer(serializers.ModelSerializer):
Article model serializers
"""
author = RegistrationSerializer(many=False, read_only=True, required=False)
image_path = serializers.ImageField(default=None)
image_path = serializers.CharField(required=False, default=None)
title = serializers.CharField(required=True)
body = serializers.CharField(required=True)
tags = TagsRelation(many=True, required=False)
Expand Down
2 changes: 1 addition & 1 deletion authors/apps/authentication/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 2.1.4 on 2019-02-12 14:53
# Generated by Django 2.1.4 on 2019-02-20 12:15

from django.db import migrations, models

Expand Down
2 changes: 1 addition & 1 deletion authors/apps/comments/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 2.1.4 on 2019-02-12 14:53
# Generated by Django 2.1.4 on 2019-02-20 12:15

from django.db import migrations, models
import django.db.models.deletion
Expand Down
2 changes: 1 addition & 1 deletion authors/apps/like_dislike/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 2.1.4 on 2019-01-24 21:48
# Generated by Django 2.1.4 on 2019-02-20 12:16

from django.conf import settings
from django.db import migrations, models
Expand Down
4 changes: 2 additions & 2 deletions authors/apps/profiles/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 2.1.4 on 2019-02-12 14:54
# Generated by Django 2.1.4 on 2019-02-20 12:16

import cloudinary.models
from django.conf import settings
Expand All @@ -20,7 +20,7 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('bio', models.TextField(blank=True)),
('image', cloudinary.models.CloudinaryField(default='https://res.cloudinary.com/dxecwuaqd/image/upload/v1548231850/jrp16w4auxhj0da6jcbk.png', max_length=255, verbose_name='image')),
('image', cloudinary.models.CloudinaryField(default='https://res.cloudinary.com/dxecwuaqd/image/upload/v1550079584/o75xgubltk4hso90l9jt.png', max_length=255, verbose_name='image')),
('First_name', models.CharField(blank=True, max_length=50)),
('Last_name', models.CharField(blank=True, max_length=50)),
('company', models.CharField(blank=True, max_length=100)),
Expand Down
2 changes: 1 addition & 1 deletion authors/apps/rating/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 2.1.4 on 2019-02-12 14:54
# Generated by Django 2.1.4 on 2019-02-20 12:16

from django.conf import settings
from django.db import migrations, models
Expand Down

0 comments on commit 510b467

Please sign in to comment.