-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from andela/ft-favorite-unfavorite-articles-16…
…2948847 #162948847 Favorite and Unfavorite Articles
- Loading branch information
Showing
11 changed files
with
287 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Generated by Django 2.1.4 on 2019-01-23 08:10 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('articles', '0009_auto_20190121_0754'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='FavoriteArticle', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('body', models.BooleanField(default=False)), | ||
('article', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='article', to='articles.Article')), | ||
('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='author', to=settings.AUTH_USER_MODEL)), | ||
], | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
authors/apps/articles/migrations/0011_auto_20190123_0813.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.1.4 on 2019-01-23 08:13 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('articles', '0010_favoritearticle'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='favoritearticle', | ||
old_name='body', | ||
new_name='is_favorited', | ||
), | ||
] |
31 changes: 31 additions & 0 deletions
31
authors/apps/articles/migrations/0012_auto_20190123_1537.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Generated by Django 2.1.4 on 2019-01-23 15:37 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('articles', '0011_auto_20190123_0813'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='favoritearticle', | ||
name='article', | ||
), | ||
migrations.RemoveField( | ||
model_name='favoritearticle', | ||
name='author', | ||
), | ||
migrations.AddField( | ||
model_name='article', | ||
name='favorite', | ||
field=models.ManyToManyField(blank=True, related_name='favorite', to=settings.AUTH_USER_MODEL), | ||
), | ||
migrations.DeleteModel( | ||
name='FavoriteArticle', | ||
), | ||
] |
19 changes: 19 additions & 0 deletions
19
authors/apps/articles/migrations/0013_auto_20190123_1545.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 2.1.4 on 2019-01-23 15:45 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('articles', '0012_auto_20190123_1537'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='article', | ||
name='favorite', | ||
field=models.ManyToManyField(default=False, related_name='favorite', to=settings.AUTH_USER_MODEL), | ||
), | ||
] |
14 changes: 14 additions & 0 deletions
14
authors/apps/articles/migrations/0014_merge_20190128_0757.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Generated by Django 2.1.5 on 2019-01-28 07:57 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('articles', '0012_merge_20190125_1317'), | ||
('articles', '0013_auto_20190123_1545'), | ||
] | ||
|
||
operations = [ | ||
] |
14 changes: 14 additions & 0 deletions
14
authors/apps/articles/migrations/0015_merge_20190128_0914.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Generated by Django 2.1.5 on 2019-01-28 09:14 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('articles', '0013_merge_20190125_1538'), | ||
('articles', '0014_merge_20190128_0757'), | ||
] | ||
|
||
operations = [ | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.