-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
1,067 additions
and
90 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
release: ./manage makemigrations&&./manage.py migrate --noinput | ||
web: gunicorn authors.wsgi --log-file - |
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 |
---|---|---|
@@ -1,45 +1,70 @@ | ||
{ | ||
"name": "ah-backend-athena", | ||
"description": "Backend of a social platform for the creative at heart", | ||
"repository": "https://github.com/andela/ah-backend-athena", | ||
"keywords": ["python", "django", "authors", "haven", "social", "api"], | ||
"env": { | ||
"DB_NAME": { | ||
"required": true | ||
}, | ||
"DB_PASSWORD": { | ||
"required": true | ||
}, | ||
"DB_USER": { | ||
"required": true | ||
}, | ||
"DISABLE_COLLECTSTATIC": { | ||
"required": true | ||
}, | ||
"HOST": { | ||
"required": true | ||
}, | ||
"PORT": { | ||
"required": true | ||
}, | ||
"SECRET_KEY": { | ||
"required": true | ||
} | ||
}, | ||
"formation": { | ||
"web": { | ||
"quantity": 1 | ||
} | ||
}, | ||
"addons": [ | ||
"heroku-postgresql" | ||
], | ||
"scripts": { | ||
"postdeploy": "python manage.py migrate --noinput" | ||
}, | ||
"buildpacks":[ | ||
{ | ||
"url": "heroku/python" | ||
} | ||
] | ||
} | ||
"name": "ah-backend-athena", | ||
"description": "Backend of a social platform for the creative at heart", | ||
"repository": "https://github.com/andela/ah-backend-athena", | ||
"keywords": ["python", "django", "authors", "haven", "social", "api"], | ||
"env": { | ||
"DB_NAME": { | ||
"required": true | ||
}, | ||
"DB_PASSWORD": { | ||
"required": true | ||
}, | ||
"DB_USER": { | ||
"required": true | ||
}, | ||
"DISABLE_COLLECTSTATIC": { | ||
"required": true | ||
}, | ||
"HOST": { | ||
"required": true | ||
}, | ||
"PORT": { | ||
"required": true | ||
}, | ||
"DEBUG": { | ||
"required": true | ||
}, | ||
"SECRET_KEY": { | ||
"required": true | ||
}, | ||
"EMAIL": { | ||
"required": true | ||
}, | ||
"EMAIL_PASSWORD": { | ||
"required": true | ||
}, | ||
"TLS": { | ||
"required": true | ||
}, | ||
"EMAIL_PORT": { | ||
"required": true | ||
}, | ||
"TWITTER_CONSUMER_KEY": { | ||
"required": true | ||
}, | ||
"TWITTER_CONSUMER_SECRET": { | ||
"required": true | ||
}, | ||
"GOOGLE_CLIENT_ID": { | ||
"required": true | ||
}, | ||
"GOOGLE_SECRET_ID": { | ||
"required": true | ||
} | ||
}, | ||
"formation": { | ||
"web": { | ||
"quantity": 1 | ||
} | ||
}, | ||
"addons": [ | ||
"heroku-postgresql" | ||
], | ||
"scripts": { | ||
"postdeploy": "./manage makemigrations&&./manage.py migrate --noinput" | ||
}, | ||
"buildpacks": [{ | ||
"url": "heroku/python" | ||
}] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Generated by Django 2.1.3 on 2018-12-18 13:06 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Article', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('title', models.CharField(db_index=True, max_length=255)), | ||
('body', models.TextField(db_index=True)), | ||
('description', models.CharField(db_index=True, max_length=255, null=True)), | ||
('slug', models.SlugField(max_length=255, unique=True)), | ||
('published', models.BooleanField(default=False)), | ||
('created_at', models.DateTimeField(auto_now_add=True)), | ||
('updated_at', models.DateTimeField(auto_now=True)), | ||
('favourited', models.BooleanField(default=False)), | ||
('favouriteCount', models.IntegerField(default=0)), | ||
('likes_count', models.IntegerField(default=0)), | ||
], | ||
options={ | ||
'ordering': ['-created_at', '-updated_at'], | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='ArticleImg', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('image_url', models.URLField(blank=True, null=True)), | ||
('description', models.CharField(db_index=True, max_length=255)), | ||
('position_in_body_before', models.IntegerField(null=True)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Comments', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('comment_body', models.TextField()), | ||
('created_at', models.DateTimeField(auto_now_add=True)), | ||
('updated_at', models.DateTimeField(auto_now_add=True)), | ||
], | ||
options={ | ||
'get_latest_by': ['created_at'], | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='Favourites', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('favourite', models.BooleanField(default=False)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Likes', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('like', models.BooleanField()), | ||
('article', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='articles.Article')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Tag', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('tag', models.CharField(max_length=255)), | ||
('slug', models.SlugField(unique=True)), | ||
], | ||
), | ||
] |
64 changes: 64 additions & 0 deletions
64
authors/apps/articles/migrations/0002_auto_20181218_1306.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,64 @@ | ||
# Generated by Django 2.1.3 on 2018-12-18 13:06 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('articles', '0001_initial'), | ||
('profiles', '0001_initial'), | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='likes', | ||
name='profile', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='profiles.Profile'), | ||
), | ||
migrations.AddField( | ||
model_name='favourites', | ||
name='article', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='article_id', to='articles.Article'), | ||
), | ||
migrations.AddField( | ||
model_name='favourites', | ||
name='profile', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='profiles.Profile'), | ||
), | ||
migrations.AddField( | ||
model_name='comments', | ||
name='article', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='articles.Article'), | ||
), | ||
migrations.AddField( | ||
model_name='comments', | ||
name='author', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), | ||
), | ||
migrations.AddField( | ||
model_name='comments', | ||
name='parent', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='articles.Comments'), | ||
), | ||
migrations.AddField( | ||
model_name='articleimg', | ||
name='article', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='articles.Article'), | ||
), | ||
migrations.AddField( | ||
model_name='article', | ||
name='author', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='profiles.Profile'), | ||
), | ||
migrations.AddField( | ||
model_name='article', | ||
name='tags', | ||
field=models.ManyToManyField(related_name='articles', to='articles.Tag'), | ||
), | ||
] |
Oops, something went wrong.