diff --git a/deploy/project_settings.py b/deploy/project_settings.py index 1e488abee915abb2d593edd8e3b9447b7dbe7c94..4632d5eb7233c7832be744ad71e39c8dfed6c426 100644 --- a/deploy/project_settings.py +++ b/deploy/project_settings.py @@ -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' ################################################################## diff --git a/django/website/hid/migrations/0003_rename_question_type_terms.py b/django/website/hid/migrations/0003_rename_question_type_terms.py new file mode 100644 index 0000000000000000000000000000000000000000..e0ffc91838a82eb8de2d5a8ca41f732d799f9c41 --- /dev/null +++ b/django/website/hid/migrations/0003_rename_question_type_terms.py @@ -0,0 +1,43 @@ +# -*- 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) + ]