Skip to content
Snippets Groups Projects
Commit 8de649e1 authored by Martin Burchell's avatar Martin Burchell
Browse files

Merge branch 'develop' into transport_itemcount_time

parents b6269b54 cbf2c345
No related branches found
No related tags found
1 merge request!4Transport itemcount time
......@@ -17,7 +17,8 @@ project_name = "internewshid"
# repository = 'https://svn.aptivate.org/svn/' + project_name + '/dev'
repo_type = "git"
repository = 'git@git.aptivate.org:' + project_name + '.git'
repository = 'git@github.com:aptivate/internewshid.git'
# repository = 'git@github.com:aptivate/' + project_name + '.git'
##################################################################
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
QUESTION_TYPES = (
('Ebola updates', 'What are the current updates on Ebola.'),
('Ebola authenticity', 'Is Ebola a real disease.'),
('Ebola prevention', 'What measures could be put in place to end Ebola.'),
('Ebola origins', 'What is the origin of Ebola.'),
('Non-Ebola concerns', 'All other non-Ebola related concerns.'),
('Ebola symptoms', 'What are the symptoms of Ebola.'),
('Ebola vaccine', 'What is the status of the Ebola vaccine.'),
('Liberia Ebola-free', 'Can Liberia be Ebola free.'),
('Unknown', 'Unknown.'),
)
def rename_question_type_terms(apps, schema_editor):
Taxonomy = apps.get_model('taxonomies', 'Taxonomy')
Term = apps.get_model('taxonomies', 'Term')
(taxonomy, _) = Taxonomy.objects.get_or_create(
slug="ebola-questions",
name="Ebola Questions",
)
Term.objects.filter(taxonomy=taxonomy).delete()
new_terms = [
Term(name=qt[0], long_name=qt[1], taxonomy=taxonomy)
for qt in QUESTION_TYPES
]
Term.objects.bulk_create(new_terms)
class Migration(migrations.Migration):
dependencies = [
('hid', '0002_rename_question_type_terms'),
]
operations = [
migrations.RunPython(rename_question_type_terms)
]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment