Skip to content

Commit

Permalink
Merge pull request #344 from webkom/reactions
Browse files Browse the repository at this point in the history
Add reaction_types to load_fixtures
  • Loading branch information
eirsyl authored Nov 15, 2016
2 parents 9b3bce8 + 5232175 commit b7e0612
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 2 deletions.
20 changes: 20 additions & 0 deletions lego/apps/reactions/migrations/0003_auto_20161115_1732.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-11-15 17:32
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('reactions', '0002_auto_20161025_1702'),
]

operations = [
migrations.AlterField(
model_name='reactiontype',
name='short_code',
field=models.CharField(max_length=40, primary_key=True, serialize=False),
),
]
20 changes: 20 additions & 0 deletions lego/apps/reactions/migrations/0004_auto_20161115_1735.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-11-15 17:35
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('reactions', '0003_auto_20161115_1732'),
]

operations = [
migrations.AlterField(
model_name='reactiontype',
name='unicode',
field=models.CharField(db_index=True, max_length=24),
),
]
4 changes: 2 additions & 2 deletions lego/apps/reactions/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def get_queryset(self):


class ReactionType(BasisModel):
short_code = models.CharField(max_length=20, primary_key=True)
unicode = models.CharField(max_length=20, db_index=True)
short_code = models.CharField(max_length=40, primary_key=True)
unicode = models.CharField(max_length=24, db_index=True)


class Reaction(BasisModel):
Expand Down
1 change: 1 addition & 0 deletions lego/utils/management/commands/load_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ def handle(self, *args, **options):
call_command('loaddata', 'lego/apps/articles/fixtures/development_articles.yaml')
call_command('loaddata', 'lego/apps/quotes/fixtures/development_quotes.yaml')
call_command('loaddata', 'lego/apps/oauth/fixtures/development_applications.yaml')
call_command('loaddata', 'lego/apps/reactions/fixtures/emojione_reaction_types.yaml')
self.stdout.write('Done!')

0 comments on commit b7e0612

Please sign in to comment.