Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
internewshid
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aptivate
client-projects
internewshid
Commits
8de649e1
Commit
8de649e1
authored
9 years ago
by
Martin Burchell
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' into transport_itemcount_time
parents
b6269b54
cbf2c345
No related branches found
Branches containing commit
No related tags found
1 merge request
!4
Transport itemcount time
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
deploy/project_settings.py
+2
-1
2 additions, 1 deletion
deploy/project_settings.py
django/website/hid/migrations/0003_rename_question_type_terms.py
+43
-0
43 additions, 0 deletions
...website/hid/migrations/0003_rename_question_type_terms.py
with
45 additions
and
1 deletion
deploy/project_settings.py
+
2
−
1
View file @
8de649e1
...
...
@@ -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'
##################################################################
...
...
This diff is collapsed.
Click to expand it.
django/website/hid/migrations/0003_rename_question_type_terms.py
0 → 100644
+
43
−
0
View file @
8de649e1
# -*- 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
)
]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment