From fd06b683bb226b7ef0f03ceff3a2318a7c132916 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 29 Jul 2013 22:45:28 +0200 Subject: [PATCH] Improved regenerate. --- greenmine/base/fixtures/initial_data.json | 602 ---------------------- greenmine/base/fixtures/initial_role.json | 557 ++++++++++++++++++++ greenmine/settings/common.py | 2 +- regenerate.sh | 4 +- 4 files changed, 559 insertions(+), 606 deletions(-) delete mode 100644 greenmine/base/fixtures/initial_data.json create mode 100644 greenmine/base/fixtures/initial_role.json diff --git a/greenmine/base/fixtures/initial_data.json b/greenmine/base/fixtures/initial_data.json deleted file mode 100644 index 64000a77..00000000 --- a/greenmine/base/fixtures/initial_data.json +++ /dev/null @@ -1,602 +0,0 @@ -[ -{ - "pk": 1, - "model": "base.role", - "fields": { - "permissions": [ - [ - "add_logentry", - "admin", - "logentry" - ], - [ - "change_logentry", - "admin", - "logentry" - ], - [ - "delete_logentry", - "admin", - "logentry" - ], - [ - "add_group", - "auth", - "group" - ], - [ - "change_group", - "auth", - "group" - ], - [ - "delete_group", - "auth", - "group" - ], - [ - "add_permission", - "auth", - "permission" - ], - [ - "change_permission", - "auth", - "permission" - ], - [ - "delete_permission", - "auth", - "permission" - ], - [ - "add_role", - "base", - "role" - ], - [ - "change_role", - "base", - "role" - ], - [ - "delete_role", - "base", - "role" - ], - [ - "add_user", - "base", - "user" - ], - [ - "change_user", - "base", - "user" - ], - [ - "delete_user", - "base", - "user" - ], - [ - "add_contenttype", - "contenttypes", - "contenttype" - ], - [ - "change_contenttype", - "contenttypes", - "contenttype" - ], - [ - "delete_contenttype", - "contenttypes", - "contenttype" - ], - [ - "add_document", - "documents", - "document" - ], - [ - "change_owned_documents", - "documents", - "document" - ], - [ - "download_from_my_projects", - "documents", - "document" - ], - [ - "download_from_other_projects", - "documents", - "document" - ], - [ - "view_documents", - "documents", - "document" - ], - [ - "change_document", - "documents", - "document" - ], - [ - "delete_document", - "documents", - "document" - ], - [ - "add_question", - "questions", - "question" - ], - [ - "assign_question_to_myself", - "questions", - "question" - ], - [ - "assign_question_to_other", - "questions", - "question" - ], - [ - "change_assigned_question", - "questions", - "question" - ], - [ - "change_owned_question", - "questions", - "question" - ], - [ - "change_question_state", - "questions", - "question" - ], - [ - "reply_question", - "questions", - "question" - ], - [ - "view_question", - "questions", - "question" - ], - [ - "change_question", - "questions", - "question" - ], - [ - "delete_question", - "questions", - "question" - ], - [ - "add_questionstatus", - "questions", - "questionstatus" - ], - [ - "change_questionstatus", - "questions", - "questionstatus" - ], - [ - "delete_questionstatus", - "questions", - "questionstatus" - ], - [ - "add_attachment", - "scrum", - "attachment" - ], - [ - "change_attachment", - "scrum", - "attachment" - ], - [ - "delete_attachment", - "scrum", - "attachment" - ], - [ - "add_issue", - "scrum", - "issue" - ], - [ - "assign_issue_to_myself", - "scrum", - "issue" - ], - [ - "assign_issue_to_other", - "scrum", - "issue" - ], - [ - "change_assigned_issue", - "scrum", - "issue" - ], - [ - "change_issue_state", - "scrum", - "issue" - ], - [ - "change_owned_issue", - "scrum", - "issue" - ], - [ - "comment_issue", - "scrum", - "issue" - ], - [ - "view_issue", - "scrum", - "issue" - ], - [ - "change_issue", - "scrum", - "issue" - ], - [ - "delete_issue", - "scrum", - "issue" - ], - [ - "add_issuestatus", - "scrum", - "issuestatus" - ], - [ - "change_issuestatus", - "scrum", - "issuestatus" - ], - [ - "delete_issuestatus", - "scrum", - "issuestatus" - ], - [ - "add_issuetype", - "scrum", - "issuetype" - ], - [ - "change_issuetype", - "scrum", - "issuetype" - ], - [ - "delete_issuetype", - "scrum", - "issuetype" - ], - [ - "add_membership", - "scrum", - "membership" - ], - [ - "change_membership", - "scrum", - "membership" - ], - [ - "delete_membership", - "scrum", - "membership" - ], - [ - "add_milestone", - "scrum", - "milestone" - ], - [ - "view_milestone", - "scrum", - "milestone" - ], - [ - "change_milestone", - "scrum", - "milestone" - ], - [ - "delete_milestone", - "scrum", - "milestone" - ], - [ - "add_points", - "scrum", - "points" - ], - [ - "change_points", - "scrum", - "points" - ], - [ - "delete_points", - "scrum", - "points" - ], - [ - "add_priority", - "scrum", - "priority" - ], - [ - "change_priority", - "scrum", - "priority" - ], - [ - "delete_priority", - "scrum", - "priority" - ], - [ - "add_project", - "scrum", - "project" - ], - [ - "list_projects", - "scrum", - "project" - ], - [ - "manage_users", - "scrum", - "project" - ], - [ - "view_project", - "scrum", - "project" - ], - [ - "change_project", - "scrum", - "project" - ], - [ - "delete_project", - "scrum", - "project" - ], - [ - "add_severity", - "scrum", - "severity" - ], - [ - "change_severity", - "scrum", - "severity" - ], - [ - "delete_severity", - "scrum", - "severity" - ], - [ - "add_task", - "scrum", - "task" - ], - [ - "add_task_to_us", - "scrum", - "task" - ], - [ - "assign_task_to_myself", - "scrum", - "task" - ], - [ - "assign_task_to_other", - "scrum", - "task" - ], - [ - "change_assigned_task", - "scrum", - "task" - ], - [ - "change_owned_task", - "scrum", - "task" - ], - [ - "change_task_state", - "scrum", - "task" - ], - [ - "comment_task", - "scrum", - "task" - ], - [ - "view_task", - "scrum", - "task" - ], - [ - "change_task", - "scrum", - "task" - ], - [ - "delete_task", - "scrum", - "task" - ], - [ - "add_taskstatus", - "scrum", - "taskstatus" - ], - [ - "change_taskstatus", - "scrum", - "taskstatus" - ], - [ - "delete_taskstatus", - "scrum", - "taskstatus" - ], - [ - "add_userstory", - "scrum", - "userstory" - ], - [ - "add_userstory_to_milestones", - "scrum", - "userstory" - ], - [ - "change_owned_userstory", - "scrum", - "userstory" - ], - [ - "comment_userstory", - "scrum", - "userstory" - ], - [ - "delete_userstory", - "scrum", - "userstory" - ], - [ - "view_userstory", - "scrum", - "userstory" - ], - [ - "change_userstory", - "scrum", - "userstory" - ], - [ - "delete_userstory", - "scrum", - "userstory" - ], - [ - "add_userstorystatus", - "scrum", - "userstorystatus" - ], - [ - "change_userstorystatus", - "scrum", - "userstorystatus" - ], - [ - "delete_userstorystatus", - "scrum", - "userstorystatus" - ], - [ - "add_session", - "sessions", - "session" - ], - [ - "change_session", - "sessions", - "session" - ], - [ - "delete_session", - "sessions", - "session" - ], - [ - "add_migrationhistory", - "south", - "migrationhistory" - ], - [ - "change_migrationhistory", - "south", - "migrationhistory" - ], - [ - "delete_migrationhistory", - "south", - "migrationhistory" - ], - [ - "add_wikipage", - "wiki", - "wikipage" - ], - [ - "change_owned_wikipage", - "wiki", - "wikipage" - ], - [ - "view_wikipage", - "wiki", - "wikipage" - ], - [ - "change_wikipage", - "wiki", - "wikipage" - ], - [ - "delete_wikipage", - "wiki", - "wikipage" - ], - [ - "add_wikipageattachment", - "wiki", - "wikipageattachment" - ], - [ - "change_wikipageattachment", - "wiki", - "wikipageattachment" - ], - [ - "delete_wikipageattachment", - "wiki", - "wikipageattachment" - ] - ], - "name": "Dev", - "slug": "" - } -} -] diff --git a/greenmine/base/fixtures/initial_role.json b/greenmine/base/fixtures/initial_role.json new file mode 100644 index 00000000..5e639a98 --- /dev/null +++ b/greenmine/base/fixtures/initial_role.json @@ -0,0 +1,557 @@ +[ +{ + "pk": 1, + "model": "base.role", + "fields": { + "permissions": [ + [ + "add_logentry", + "admin", + "logentry" + ], + [ + "change_logentry", + "admin", + "logentry" + ], + [ + "delete_logentry", + "admin", + "logentry" + ], + [ + "add_group", + "auth", + "group" + ], + [ + "change_group", + "auth", + "group" + ], + [ + "delete_group", + "auth", + "group" + ], + [ + "add_permission", + "auth", + "permission" + ], + [ + "change_permission", + "auth", + "permission" + ], + [ + "delete_permission", + "auth", + "permission" + ], + [ + "add_role", + "base", + "role" + ], + [ + "change_role", + "base", + "role" + ], + [ + "delete_role", + "base", + "role" + ], + [ + "add_user", + "base", + "user" + ], + [ + "change_user", + "base", + "user" + ], + [ + "delete_user", + "base", + "user" + ], + [ + "add_contenttype", + "contenttypes", + "contenttype" + ], + [ + "change_contenttype", + "contenttypes", + "contenttype" + ], + [ + "delete_contenttype", + "contenttypes", + "contenttype" + ], + [ + "add_message", + "djmail", + "message" + ], + [ + "change_message", + "djmail", + "message" + ], + [ + "delete_message", + "djmail", + "message" + ], + [ + "add_revision", + "reversion", + "revision" + ], + [ + "change_revision", + "reversion", + "revision" + ], + [ + "delete_revision", + "reversion", + "revision" + ], + [ + "add_version", + "reversion", + "version" + ], + [ + "change_version", + "reversion", + "version" + ], + [ + "delete_version", + "reversion", + "version" + ], + [ + "add_attachment", + "scrum", + "attachment" + ], + [ + "change_attachment", + "scrum", + "attachment" + ], + [ + "delete_attachment", + "scrum", + "attachment" + ], + [ + "add_issue", + "scrum", + "issue" + ], + [ + "assign_issue_to_myself", + "scrum", + "issue" + ], + [ + "assign_issue_to_other", + "scrum", + "issue" + ], + [ + "change_assigned_issue", + "scrum", + "issue" + ], + [ + "change_issue", + "scrum", + "issue" + ], + [ + "change_issue_state", + "scrum", + "issue" + ], + [ + "change_owned_issue", + "scrum", + "issue" + ], + [ + "comment_issue", + "scrum", + "issue" + ], + [ + "delete_issue", + "scrum", + "issue" + ], + [ + "view_issue", + "scrum", + "issue" + ], + [ + "add_issuestatus", + "scrum", + "issuestatus" + ], + [ + "change_issuestatus", + "scrum", + "issuestatus" + ], + [ + "delete_issuestatus", + "scrum", + "issuestatus" + ], + [ + "add_issuetype", + "scrum", + "issuetype" + ], + [ + "change_issuetype", + "scrum", + "issuetype" + ], + [ + "delete_issuetype", + "scrum", + "issuetype" + ], + [ + "add_membership", + "scrum", + "membership" + ], + [ + "change_membership", + "scrum", + "membership" + ], + [ + "delete_membership", + "scrum", + "membership" + ], + [ + "add_milestone", + "scrum", + "milestone" + ], + [ + "change_milestone", + "scrum", + "milestone" + ], + [ + "delete_milestone", + "scrum", + "milestone" + ], + [ + "view_milestone", + "scrum", + "milestone" + ], + [ + "add_points", + "scrum", + "points" + ], + [ + "change_points", + "scrum", + "points" + ], + [ + "delete_points", + "scrum", + "points" + ], + [ + "add_priority", + "scrum", + "priority" + ], + [ + "change_priority", + "scrum", + "priority" + ], + [ + "delete_priority", + "scrum", + "priority" + ], + [ + "add_project", + "scrum", + "project" + ], + [ + "change_project", + "scrum", + "project" + ], + [ + "delete_project", + "scrum", + "project" + ], + [ + "list_projects", + "scrum", + "project" + ], + [ + "manage_users", + "scrum", + "project" + ], + [ + "view_project", + "scrum", + "project" + ], + [ + "add_rolepoints", + "scrum", + "rolepoints" + ], + [ + "change_rolepoints", + "scrum", + "rolepoints" + ], + [ + "delete_rolepoints", + "scrum", + "rolepoints" + ], + [ + "add_severity", + "scrum", + "severity" + ], + [ + "change_severity", + "scrum", + "severity" + ], + [ + "delete_severity", + "scrum", + "severity" + ], + [ + "add_task", + "scrum", + "task" + ], + [ + "add_task_to_us", + "scrum", + "task" + ], + [ + "assign_task_to_myself", + "scrum", + "task" + ], + [ + "assign_task_to_other", + "scrum", + "task" + ], + [ + "change_assigned_task", + "scrum", + "task" + ], + [ + "change_owned_task", + "scrum", + "task" + ], + [ + "change_task", + "scrum", + "task" + ], + [ + "change_task_state", + "scrum", + "task" + ], + [ + "comment_task", + "scrum", + "task" + ], + [ + "delete_task", + "scrum", + "task" + ], + [ + "view_task", + "scrum", + "task" + ], + [ + "add_taskstatus", + "scrum", + "taskstatus" + ], + [ + "change_taskstatus", + "scrum", + "taskstatus" + ], + [ + "delete_taskstatus", + "scrum", + "taskstatus" + ], + [ + "add_userstory", + "scrum", + "userstory" + ], + [ + "add_userstory_to_milestones", + "scrum", + "userstory" + ], + [ + "change_owned_userstory", + "scrum", + "userstory" + ], + [ + "change_userstory", + "scrum", + "userstory" + ], + [ + "comment_userstory", + "scrum", + "userstory" + ], + [ + "delete_userstory", + "scrum", + "userstory" + ], + [ + "view_userstory", + "scrum", + "userstory" + ], + [ + "add_userstorystatus", + "scrum", + "userstorystatus" + ], + [ + "change_userstorystatus", + "scrum", + "userstorystatus" + ], + [ + "delete_userstorystatus", + "scrum", + "userstorystatus" + ], + [ + "add_session", + "sessions", + "session" + ], + [ + "change_session", + "sessions", + "session" + ], + [ + "delete_session", + "sessions", + "session" + ], + [ + "add_migrationhistory", + "south", + "migrationhistory" + ], + [ + "change_migrationhistory", + "south", + "migrationhistory" + ], + [ + "delete_migrationhistory", + "south", + "migrationhistory" + ], + [ + "add_wikipage", + "wiki", + "wikipage" + ], + [ + "change_owned_wikipage", + "wiki", + "wikipage" + ], + [ + "change_wikipage", + "wiki", + "wikipage" + ], + [ + "delete_wikipage", + "wiki", + "wikipage" + ], + [ + "view_wikipage", + "wiki", + "wikipage" + ], + [ + "add_wikipageattachment", + "wiki", + "wikipageattachment" + ], + [ + "change_wikipageattachment", + "wiki", + "wikipageattachment" + ], + [ + "delete_wikipageattachment", + "wiki", + "wikipageattachment" + ] + ], + "name": "Dev", + "slug": "dev" + } +} +] diff --git a/greenmine/settings/common.py b/greenmine/settings/common.py index 55941fac..d86466e7 100644 --- a/greenmine/settings/common.py +++ b/greenmine/settings/common.py @@ -204,7 +204,7 @@ INSTALLED_APPS = [ 'greenmine.base.notifications', 'greenmine.scrum', 'greenmine.wiki', - #'greenmine.questions', + 'greenmine.questions', 'south', 'haystack', diff --git a/regenerate.sh b/regenerate.sh index 3c69ca24..646f2bb9 100755 --- a/regenerate.sh +++ b/regenerate.sh @@ -1,14 +1,12 @@ #!/bin/bash -# For sqlite -rm -f database.sqlite - # For postgresql dropdb greenmine createdb greenmine python manage.py syncdb --migrate --noinput --traceback python manage.py loaddata initial_user --traceback +python manage.py loaddata initial_role --traceback python manage.py sample_data --traceback python manage.py createinitialrevisions --traceback