Commits

Matthew Marshall committed 9577fc0 Merge

merge

  • Participants
  • Parent commits 8d3dd5d, 94319ba

Comments (0)

Files changed (17)

-[{"pk": 8, "model": "admin.logentry", "fields": {"action_flag": 2, "action_time": "2008-02-19 14:04:42", "object_repr": "Secret Project", "object_id": "2", "change_message": "Changed project owner.", "user": 2, "content_type": 15}}, {"pk": 7, "model": "admin.logentry", "fields": {"action_flag": 2, "action_time": "2008-02-19 14:04:04", "object_repr": "Secret Project", "object_id": "2", "change_message": "Changed description long.", "user": 2, "content_type": 15}}, {"pk": 6, "model": "admin.logentry", "fields": {"action_flag": 1, "action_time": "2008-02-19 14:02:18", "object_repr": "Permissions for charles in Secret Project", "object_id": "3", "change_message": "", "user": 2, "content_type": 17}}, {"pk": 5, "model": "admin.logentry", "fields": {"action_flag": 3, "action_time": "2008-02-19 13:27:04", "object_repr": "test_admin2", "object_id": "3", "change_message": "", "user": 2, "content_type": 4}}, {"pk": 4, "model": "admin.logentry", "fields": {"action_flag": 2, "action_time": "2008-02-19 13:21:04", "object_repr": "Default permission set for project Secret Project", "object_id": "2", "change_message": "Changed view project, view repos, view issues and view wiki.", "user": 2, "content_type": 17}}, {"pk": 3, "model": "admin.logentry", "fields": {"action_flag": 1, "action_time": "2008-02-19 13:20:30", "object_repr": "Secret Project", "object_id": "2", "change_message": "", "user": 2, "content_type": 15}}, {"pk": 2, "model": "admin.logentry", "fields": {"action_flag": 1, "action_time": "2008-02-05 23:43:46", "object_repr": "The Manhattan Project", "object_id": "1", "change_message": "", "user": 1, "content_type": 15}}, {"pk": 1, "model": "admin.logentry", "fields": {"action_flag": 2, "action_time": "2008-02-05 23:35:53", "object_repr": "test_admin", "object_id": "2", "change_message": "Changed staff status, active and superuser status.", "user": 1, "content_type": 4}}, {"pk": 1, "model": "auth.user", "fields": {"username": "alisic", "first_name": "", "last_name": "", "is_active": true, "is_superuser": true, "is_staff": true, "last_login": "2008-02-07 14:46:11", "groups": [], "user_permissions": [], "password": "sha1$5930f$7fbcbdef9aaedc15d4a85e65fd92c83de702427c", "email": "sav@asv.as", "date_joined": "2008-02-05 22:56:50"}}, {"pk": 3, "model": "auth.user", "fields": {"username": "charles", "first_name": "", "last_name": "", "is_active": true, "is_superuser": false, "is_staff": false, "last_login": "2008-02-19 13:27:13", "groups": [], "user_permissions": [], "password": "sha1$69102$af413552fd2545c423bb5f41dd0056c08c6102ba", "email": "", "date_joined": "2008-02-19 13:27:13"}}, {"pk": 4, "model": "auth.user", "fields": {"username": "johnny", "first_name": "", "last_name": "", "is_active": true, "is_superuser": false, "is_staff": false, "last_login": "2008-02-19 14:04:21", "groups": [], "user_permissions": [], "password": "sha1$8ffa6$60fe5889a521d9831becfb66842a420e46b1d927", "email": "", "date_joined": "2008-02-19 14:04:21"}}, {"pk": 2, "model": "auth.user", "fields": {"username": "test_admin", "first_name": "", "last_name": "", "is_active": true, "is_superuser": true, "is_staff": true, "last_login": "2008-02-19 13:19:21", "groups": [], "user_permissions": [], "password": "sha1$3bdad$b068868ecce02f5db7ee7f2907566ca0f918aab9", "email": "", "date_joined": "2008-02-05 23:35:31"}}, {"pk": 1, "model": "auth.permission", "fields": {"codename": "add_logentry", "name": "Can add log entry", "content_type": 1}}, {"pk": 2, "model": "auth.permission", "fields": {"codename": "change_logentry", "name": "Can change log entry", "content_type": 1}}, {"pk": 3, "model": "auth.permission", "fields": {"codename": "delete_logentry", "name": "Can delete log entry", "content_type": 1}}, {"pk": 4, "model": "auth.permission", "fields": {"codename": "add_message", "name": "Can add message", "content_type": 2}}, {"pk": 5, "model": "auth.permission", "fields": {"codename": "change_message", "name": "Can change message", "content_type": 2}}, {"pk": 6, "model": "auth.permission", "fields": {"codename": "delete_message", "name": "Can delete message", "content_type": 2}}, {"pk": 7, "model": "auth.permission", "fields": {"codename": "add_group", "name": "Can add group", "content_type": 3}}, {"pk": 8, "model": "auth.permission", "fields": {"codename": "change_group", "name": "Can change group", "content_type": 3}}, {"pk": 9, "model": "auth.permission", "fields": {"codename": "delete_group", "name": "Can delete group", "content_type": 3}}, {"pk": 10, "model": "auth.permission", "fields": {"codename": "add_user", "name": "Can add user", "content_type": 4}}, {"pk": 11, "model": "auth.permission", "fields": {"codename": "change_user", "name": "Can change user", "content_type": 4}}, {"pk": 12, "model": "auth.permission", "fields": {"codename": "delete_user", "name": "Can delete user", "content_type": 4}}, {"pk": 13, "model": "auth.permission", "fields": {"codename": "add_permission", "name": "Can add permission", "content_type": 5}}, {"pk": 14, "model": "auth.permission", "fields": {"codename": "change_permission", "name": "Can change permission", "content_type": 5}}, {"pk": 15, "model": "auth.permission", "fields": {"codename": "delete_permission", "name": "Can delete permission", "content_type": 5}}, {"pk": 16, "model": "auth.permission", "fields": {"codename": "add_contenttype", "name": "Can add content type", "content_type": 6}}, {"pk": 17, "model": "auth.permission", "fields": {"codename": "change_contenttype", "name": "Can change content type", "content_type": 6}}, {"pk": 18, "model": "auth.permission", "fields": {"codename": "delete_contenttype", "name": "Can delete content type", "content_type": 6}}, {"pk": 19, "model": "auth.permission", "fields": {"codename": "add_session", "name": "Can add session", "content_type": 7}}, {"pk": 20, "model": "auth.permission", "fields": {"codename": "change_session", "name": "Can change session", "content_type": 7}}, {"pk": 21, "model": "auth.permission", "fields": {"codename": "delete_session", "name": "Can delete session", "content_type": 7}}, {"pk": 22, "model": "auth.permission", "fields": {"codename": "add_site", "name": "Can add site", "content_type": 8}}, {"pk": 23, "model": "auth.permission", "fields": {"codename": "change_site", "name": "Can change site", "content_type": 8}}, {"pk": 24, "model": "auth.permission", "fields": {"codename": "delete_site", "name": "Can delete site", "content_type": 8}}, {"pk": 25, "model": "auth.permission", "fields": {"codename": "add_setting", "name": "Can add setting", "content_type": 9}}, {"pk": 26, "model": "auth.permission", "fields": {"codename": "change_setting", "name": "Can change setting", "content_type": 9}}, {"pk": 27, "model": "auth.permission", "fields": {"codename": "delete_setting", "name": "Can delete setting", "content_type": 9}}, {"pk": 28, "model": "auth.permission", "fields": {"codename": "add_projectbackup", "name": "Can add project backup", "content_type": 10}}, {"pk": 29, "model": "auth.permission", "fields": {"codename": "change_projectbackup", "name": "Can change project backup", "content_type": 10}}, {"pk": 30, "model": "auth.permission", "fields": {"codename": "delete_projectbackup", "name": "Can delete project backup", "content_type": 10}}, {"pk": 31, "model": "auth.permission", "fields": {"codename": "add_issuetype", "name": "Can add issue type", "content_type": 11}}, {"pk": 32, "model": "auth.permission", "fields": {"codename": "change_issuetype", "name": "Can change issue type", "content_type": 11}}, {"pk": 33, "model": "auth.permission", "fields": {"codename": "delete_issuetype", "name": "Can delete issue type", "content_type": 11}}, {"pk": 34, "model": "auth.permission", "fields": {"codename": "add_issueseverity", "name": "Can add issue severity", "content_type": 12}}, {"pk": 35, "model": "auth.permission", "fields": {"codename": "change_issueseverity", "name": "Can change issue severity", "content_type": 12}}, {"pk": 36, "model": "auth.permission", "fields": {"codename": "delete_issueseverity", "name": "Can delete issue severity", "content_type": 12}}, {"pk": 37, "model": "auth.permission", "fields": {"codename": "add_issue", "name": "Can add issue", "content_type": 13}}, {"pk": 40, "model": "auth.permission", "fields": {"codename": "can_edit_issue_settings", "name": "Can edit issue settings", "content_type": 13}}, {"pk": 38, "model": "auth.permission", "fields": {"codename": "change_issue", "name": "Can change issue", "content_type": 13}}, {"pk": 39, "model": "auth.permission", "fields": {"codename": "delete_issue", "name": "Can delete issue", "content_type": 13}}, {"pk": 41, "model": "auth.permission", "fields": {"codename": "add_issuestatus", "name": "Can add issue status", "content_type": 14}}, {"pk": 42, "model": "auth.permission", "fields": {"codename": "change_issuestatus", "name": "Can change issue status", "content_type": 14}}, {"pk": 43, "model": "auth.permission", "fields": {"codename": "delete_issuestatus", "name": "Can delete issue status", "content_type": 14}}, {"pk": 44, "model": "auth.permission", "fields": {"codename": "add_project", "name": "Can add project", "content_type": 15}}, {"pk": 47, "model": "auth.permission", "fields": {"codename": "can_edit_project_settings", "name": "Can edit project settings", "content_type": 15}}, {"pk": 45, "model": "auth.permission", "fields": {"codename": "change_project", "name": "Can change project", "content_type": 15}}, {"pk": 46, "model": "auth.permission", "fields": {"codename": "delete_project", "name": "Can delete project", "content_type": 15}}, {"pk": 48, "model": "auth.permission", "fields": {"codename": "add_projectnews", "name": "Can add project news item", "content_type": 16}}, {"pk": 49, "model": "auth.permission", "fields": {"codename": "change_projectnews", "name": "Can change project news item", "content_type": 16}}, {"pk": 50, "model": "auth.permission", "fields": {"codename": "delete_projectnews", "name": "Can delete project news item", "content_type": 16}}, {"pk": 51, "model": "auth.permission", "fields": {"codename": "add_projectpermissionset", "name": "Can add project permission set", "content_type": 17}}, {"pk": 52, "model": "auth.permission", "fields": {"codename": "change_projectpermissionset", "name": "Can change project permission set", "content_type": 17}}, {"pk": 53, "model": "auth.permission", "fields": {"codename": "delete_projectpermissionset", "name": "Can delete project permission set", "content_type": 17}}, {"pk": 54, "model": "auth.permission", "fields": {"codename": "add_repo", "name": "Can add repo", "content_type": 18}}, {"pk": 55, "model": "auth.permission", "fields": {"codename": "change_repo", "name": "Can change repo", "content_type": 18}}, {"pk": 56, "model": "auth.permission", "fields": {"codename": "delete_repo", "name": "Can delete repo", "content_type": 18}}, {"pk": 57, "model": "auth.permission", "fields": {"codename": "add_page", "name": "Can add page", "content_type": 19}}, {"pk": 58, "model": "auth.permission", "fields": {"codename": "change_page", "name": "Can change page", "content_type": 19}}, {"pk": 59, "model": "auth.permission", "fields": {"codename": "delete_page", "name": "Can delete page", "content_type": 19}}, {"pk": 60, "model": "auth.permission", "fields": {"codename": "add_pagechange", "name": "Can add page change", "content_type": 20}}, {"pk": 61, "model": "auth.permission", "fields": {"codename": "change_pagechange", "name": "Can change page change", "content_type": 20}}, {"pk": 62, "model": "auth.permission", "fields": {"codename": "delete_pagechange", "name": "Can delete page change", "content_type": 20}}, {"pk": 63, "model": "auth.permission", "fields": {"codename": "add_registrationprofile", "name": "Can add registration profile", "content_type": 21}}, {"pk": 64, "model": "auth.permission", "fields": {"codename": "change_registrationprofile", "name": "Can change registration profile", "content_type": 21}}, {"pk": 65, "model": "auth.permission", "fields": {"codename": "delete_registrationprofile", "name": "Can delete registration profile", "content_type": 21}}, {"pk": 6, "model": "contenttypes.contenttype", "fields": {"model": "contenttype", "name": "content type", "app_label": "contenttypes"}}, {"pk": 3, "model": "contenttypes.contenttype", "fields": {"model": "group", "name": "group", "app_label": "auth"}}, {"pk": 13, "model": "contenttypes.contenttype", "fields": {"model": "issue", "name": "issue", "app_label": "issue"}}, {"pk": 12, "model": "contenttypes.contenttype", "fields": {"model": "issueseverity", "name": "issue severity", "app_label": "issue"}}, {"pk": 14, "model": "contenttypes.contenttype", "fields": {"model": "issuestatus", "name": "issue status", "app_label": "issue"}}, {"pk": 11, "model": "contenttypes.contenttype", "fields": {"model": "issuetype", "name": "issue type", "app_label": "issue"}}, {"pk": 1, "model": "contenttypes.contenttype", "fields": {"model": "logentry", "name": "log entry", "app_label": "admin"}}, {"pk": 2, "model": "contenttypes.contenttype", "fields": {"model": "message", "name": "message", "app_label": "auth"}}, {"pk": 19, "model": "contenttypes.contenttype", "fields": {"model": "page", "name": "page", "app_label": "wiki"}}, {"pk": 20, "model": "contenttypes.contenttype", "fields": {"model": "pagechange", "name": "page change", "app_label": "wiki"}}, {"pk": 5, "model": "contenttypes.contenttype", "fields": {"model": "permission", "name": "permission", "app_label": "auth"}}, {"pk": 15, "model": "contenttypes.contenttype", "fields": {"model": "project", "name": "project", "app_label": "project"}}, {"pk": 10, "model": "contenttypes.contenttype", "fields": {"model": "projectbackup", "name": "project backup", "app_label": "backup"}}, {"pk": 16, "model": "contenttypes.contenttype", "fields": {"model": "projectnews", "name": "project news item", "app_label": "project"}}, {"pk": 17, "model": "contenttypes.contenttype", "fields": {"model": "projectpermissionset", "name": "project permission set", "app_label": "project"}}, {"pk": 21, "model": "contenttypes.contenttype", "fields": {"model": "registrationprofile", "name": "registration profile", "app_label": "registration"}}, {"pk": 18, "model": "contenttypes.contenttype", "fields": {"model": "repo", "name": "repo", "app_label": "repo"}}, {"pk": 7, "model": "contenttypes.contenttype", "fields": {"model": "session", "name": "session", "app_label": "sessions"}}, {"pk": 9, "model": "contenttypes.contenttype", "fields": {"model": "setting", "name": "setting", "app_label": "config"}}, {"pk": 8, "model": "contenttypes.contenttype", "fields": {"model": "site", "name": "site", "app_label": "sites"}}, {"pk": 4, "model": "contenttypes.contenttype", "fields": {"model": "user", "name": "user", "app_label": "auth"}}, {"pk": "24505bce11c98e813acb4a4ddc8a5075", "model": "sessions.session", "fields": {"expire_date": "2008-02-19 23:33:17", "session_data": "gAJ9cQEoVRJfYXV0aF91c2VyX2JhY2tlbmRxAlUpZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5k\ncy5Nb2RlbEJhY2tlbmRxA1UNX2F1dGhfdXNlcl9pZHEEigEBdS5hMzZmZjA0ZDkxN2MxYzYwYjI1\nYmJmNGYwNGFjODBjMQ==\n"}}, {"pk": "396a9fae5df13a736866b5c40ed9094a", "model": "sessions.session", "fields": {"expire_date": "2008-03-04 13:19:21", "session_data": "gAJ9cQEoVRJfYXV0aF91c2VyX2JhY2tlbmRxAlUpZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5k\ncy5Nb2RlbEJhY2tlbmRxA1UNX2F1dGhfdXNlcl9pZHEESwJ1LjVkYjUwM2JhM2E0NDRhN2YwNWRk\nYWNiNjg5YTk2MTAz\n"}}, {"pk": 1, "model": "sites.site", "fields": {"domain": "example.com", "name": "example.com"}}, {"pk": 1, "model": "config.setting", "fields": {"class_name": "Issue", "module_name": "hgfront.issue.models", "attribute_name": "issues_per_page", "site": 1, "value": "20"}}, {"pk": 2, "model": "config.setting", "fields": {"class_name": "Project", "module_name": "hgfront.project.models", "attribute_name": "repository_directory", "site": 1, "value": "\/home\/alisic\/repos"}}, {"pk": 3, "model": "config.setting", "fields": {"class_name": "Project", "module_name": "hgfront.project.models", "attribute_name": "site_owner", "site": 1, "value": "the site own0r"}}, {"pk": 4, "model": "config.setting", "fields": {"class_name": "Project", "module_name": "hgfront.project.models", "attribute_name": "backups_directory", "site": 1, "value": "\/home\/alisic\/repos\/backups"}}, {"pk": 5, "model": "config.setting", "fields": {"class_name": "Project", "module_name": "hgfront.project.models", "attribute_name": "backups_max_days", "site": 1, "value": "0"}}, {"pk": 6, "model": "config.setting", "fields": {"class_name": "Issue", "module_name": "hgfront.issue.models", "attribute_name": "issue_from_email", "site": 1, "value": "bla@bla.com"}}, {"pk": 7, "model": "config.setting", "fields": {"class_name": "Project", "module_name": "hgfront.project.models", "attribute_name": "site_name", "site": 1, "value": "The site name"}}, {"pk": 1, "model": "issue.issuetype", "fields": {"order": 0, "is_active": true, "slug": "bug", "title": "Bug"}}, {"pk": 2, "model": "issue.issuetype", "fields": {"order": 1, "is_active": true, "slug": "enhancement", "title": "Enhancement"}}, {"pk": 3, "model": "issue.issuetype", "fields": {"order": 2, "is_active": true, "slug": "feature-request", "title": "Feature Request"}}, {"pk": 4, "model": "issue.issuetype", "fields": {"order": 3, "is_active": true, "slug": "typo", "title": "Typo"}}, {"pk": 1, "model": "issue.issueseverity", "fields": {"order": 0, "is_active": true, "slug": "minor", "title": "Minor"}}, {"pk": 2, "model": "issue.issueseverity", "fields": {"order": 1, "is_active": true, "slug": "medium", "title": "Medium"}}, {"pk": 3, "model": "issue.issueseverity", "fields": {"order": 2, "is_active": true, "slug": "major", "title": "Major"}}, {"pk": 4, "model": "issue.issueseverity", "fields": {"order": 3, "is_active": true, "slug": "critical", "title": "Critical"}}, {"pk": 5, "model": "issue.issueseverity", "fields": {"order": 4, "is_active": true, "slug": "blocker", "title": "Blocker"}}, {"pk": 1, "model": "issue.issuestatus", "fields": {"order": 0, "is_active": true, "slug": "raised", "title": "Raised"}}, {"pk": 2, "model": "issue.issuestatus", "fields": {"order": 1, "is_active": true, "slug": "accepted", "title": "Accepted"}}, {"pk": 3, "model": "issue.issuestatus", "fields": {"order": 2, "is_active": true, "slug": "not-accepted", "title": "Not Accepted"}}, {"pk": 4, "model": "issue.issuestatus", "fields": {"order": 3, "is_active": true, "slug": "fixed", "title": "Fixed"}}, {"pk": 5, "model": "issue.issuestatus", "fields": {"order": 4, "is_active": true, "slug": "works-for-me", "title": "Works For Me"}}, {"pk": 1, "model": "project.project", "fields": {"hgweb_style": "default", "pub_date": "2008-02-06 00:43:40", "name_short": "manhattan", "description_long": "no desc", "user_owner": 2, "description_short": "no desc", "name_long": "The Manhattan Project"}}, {"pk": 2, "model": "project.project", "fields": {"hgweb_style": "default", "pub_date": "2008-02-19 14:20:07", "name_short": "secret_project", "description_long": "No one can view this project or do anything with it except the user `charles`, who has all the permissions for it and `johnny`, who is the owner.", "user_owner": 4, "description_short": "a secret project", "name_long": "Secret Project"}}, {"pk": 1, "model": "project.projectpermissionset", "fields": {"edit_repos": false, "project": 1, "user_accepted": true, "delete_members": false, "delete_issues": false, "view_project": true, "view_repos": true, "edit_issues": false, "edit_project": false, "edit_wiki": false, "add_wiki": false, "is_default": true, "view_issues": true, "add_issues": false, "owner_accepted": true, "view_wiki": true, "delete_repos": false, "add_repos": false, "delete_wiki": false, "add_members": false, "user": null}}, {"pk": 2, "model": "project.projectpermissionset", "fields": {"edit_repos": false, "project": 2, "user_accepted": true, "delete_members": false, "delete_issues": false, "view_project": false, "view_repos": false, "edit_issues": false, "edit_project": false, "edit_wiki": false, "add_wiki": false, "is_default": true, "view_issues": false, "add_issues": false, "owner_accepted": true, "view_wiki": false, "delete_repos": false, "add_repos": false, "delete_wiki": false, "add_members": false, "user": null}}, {"pk": 3, "model": "project.projectpermissionset", "fields": {"edit_repos": true, "project": 2, "user_accepted": true, "delete_members": true, "delete_issues": true, "view_project": true, "view_repos": true, "edit_issues": true, "edit_project": true, "edit_wiki": true, "add_wiki": true, "is_default": false, "view_issues": true, "add_issues": true, "owner_accepted": true, "view_wiki": true, "delete_repos": true, "add_repos": true, "delete_wiki": true, "add_members": true, "user": 3}}, {"pk": 1, "model": "wiki.page", "fields": {"content": "This is the main wiki page for this project, write something here!", "parent_project": 1, "name": "Main_Page"}}, {"pk": 2, "model": "wiki.page", "fields": {"content": "This is the main wiki page for this project, write something here!", "parent_project": 2, "name": "Main_Page"}}]
+[
+    {
+        "pk": 4, 
+        "model": "admin.logentry", 
+        "fields": {
+            "action_flag": 1, 
+            "action_time": "2008-03-22 13:22:55", 
+            "object_repr": "Permissions for charles in Secret project", 
+            "object_id": "3", 
+            "change_message": "", 
+            "user": 1, 
+            "content_type": 17
+        }
+    }, 
+    {
+        "pk": 3, 
+        "model": "admin.logentry", 
+        "fields": {
+            "action_flag": 2, 
+            "action_time": "2008-03-22 13:22:06", 
+            "object_repr": "Default permission set for project Secret project", 
+            "object_id": "2", 
+            "change_message": "Changed view project, view repos, view issues and view wiki.", 
+            "user": 1, 
+            "content_type": 17
+        }
+    }, 
+    {
+        "pk": 2, 
+        "model": "admin.logentry", 
+        "fields": {
+            "action_flag": 1, 
+            "action_time": "2008-03-22 13:20:49", 
+            "object_repr": "Secret project", 
+            "object_id": "2", 
+            "change_message": "", 
+            "user": 1, 
+            "content_type": 15
+        }
+    }, 
+    {
+        "pk": 1, 
+        "model": "admin.logentry", 
+        "fields": {
+            "action_flag": 1, 
+            "action_time": "2008-03-22 13:20:10", 
+            "object_repr": "The Manhattan Project", 
+            "object_id": "1", 
+            "change_message": "", 
+            "user": 1, 
+            "content_type": 15
+        }
+    }, 
+    {
+        "pk": 1, 
+        "model": "auth.user", 
+        "fields": {
+            "username": "alisic", 
+            "first_name": "", 
+            "last_name": "", 
+            "is_active": true, 
+            "is_superuser": true, 
+            "is_staff": true, 
+            "last_login": "2008-03-22 13:44:45", 
+            "groups": [], 
+            "user_permissions": [], 
+            "password": "sha1$2ed6b$c7177b371e38ee25efb568f3114cf03eaf86f4bc", 
+            "email": "a@a.com", 
+            "date_joined": "2008-03-22 13:16:58"
+        }
+    }, 
+    {
+        "pk": 2, 
+        "model": "auth.user", 
+        "fields": {
+            "username": "charles", 
+            "first_name": "", 
+            "last_name": "", 
+            "is_active": true, 
+            "is_superuser": false, 
+            "is_staff": false, 
+            "last_login": "2008-03-22 13:18:54", 
+            "groups": [], 
+            "user_permissions": [], 
+            "password": "sha1$7d1ef$6c86c63a31558243862cba7b04f5474b37877728", 
+            "email": "", 
+            "date_joined": "2008-03-22 13:18:54"
+        }
+    }, 
+    {
+        "pk": 3, 
+        "model": "auth.user", 
+        "fields": {
+            "username": "johnny", 
+            "first_name": "", 
+            "last_name": "", 
+            "is_active": true, 
+            "is_superuser": false, 
+            "is_staff": false, 
+            "last_login": "2008-03-22 13:18:58", 
+            "groups": [], 
+            "user_permissions": [], 
+            "password": "sha1$cc3bd$d0087e7b0193e3c74a04bc8382aec2b018e40ce8", 
+            "email": "", 
+            "date_joined": "2008-03-22 13:18:58"
+        }
+    }, 
+    {
+        "pk": 4, 
+        "model": "auth.user", 
+        "fields": {
+            "username": "test_admin", 
+            "first_name": "", 
+            "last_name": "", 
+            "is_active": true, 
+            "is_superuser": false, 
+            "is_staff": false, 
+            "last_login": "2008-03-22 13:19:08", 
+            "groups": [], 
+            "user_permissions": [], 
+            "password": "sha1$defae$96132053800677dcfa7ea6b7935bcc5c7f224adb", 
+            "email": "", 
+            "date_joined": "2008-03-22 13:19:08"
+        }
+    }, 
+    {
+        "pk": 1, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "add_logentry", 
+            "name": "Can add log entry", 
+            "content_type": 1
+        }
+    }, 
+    {
+        "pk": 2, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "change_logentry", 
+            "name": "Can change log entry", 
+            "content_type": 1
+        }
+    }, 
+    {
+        "pk": 3, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "delete_logentry", 
+            "name": "Can delete log entry", 
+            "content_type": 1
+        }
+    }, 
+    {
+        "pk": 4, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "add_message", 
+            "name": "Can add message", 
+            "content_type": 2
+        }
+    }, 
+    {
+        "pk": 5, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "change_message", 
+            "name": "Can change message", 
+            "content_type": 2
+        }
+    }, 
+    {
+        "pk": 6, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "delete_message", 
+            "name": "Can delete message", 
+            "content_type": 2
+        }
+    }, 
+    {
+        "pk": 7, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "add_group", 
+            "name": "Can add group", 
+            "content_type": 3
+        }
+    }, 
+    {
+        "pk": 8, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "change_group", 
+            "name": "Can change group", 
+            "content_type": 3
+        }
+    }, 
+    {
+        "pk": 9, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "delete_group", 
+            "name": "Can delete group", 
+            "content_type": 3
+        }
+    }, 
+    {
+        "pk": 10, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "add_user", 
+            "name": "Can add user", 
+            "content_type": 4
+        }
+    }, 
+    {
+        "pk": 11, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "change_user", 
+            "name": "Can change user", 
+            "content_type": 4
+        }
+    }, 
+    {
+        "pk": 12, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "delete_user", 
+            "name": "Can delete user", 
+            "content_type": 4
+        }
+    }, 
+    {
+        "pk": 13, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "add_permission", 
+            "name": "Can add permission", 
+            "content_type": 5
+        }
+    }, 
+    {
+        "pk": 14, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "change_permission", 
+            "name": "Can change permission", 
+            "content_type": 5
+        }
+    }, 
+    {
+        "pk": 15, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "delete_permission", 
+            "name": "Can delete permission", 
+            "content_type": 5
+        }
+    }, 
+    {
+        "pk": 16, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "add_contenttype", 
+            "name": "Can add content type", 
+            "content_type": 6
+        }
+    }, 
+    {
+        "pk": 17, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "change_contenttype", 
+            "name": "Can change content type", 
+            "content_type": 6
+        }
+    }, 
+    {
+        "pk": 18, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "delete_contenttype", 
+            "name": "Can delete content type", 
+            "content_type": 6
+        }
+    }, 
+    {
+        "pk": 19, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "add_session", 
+            "name": "Can add session", 
+            "content_type": 7
+        }
+    }, 
+    {
+        "pk": 20, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "change_session", 
+            "name": "Can change session", 
+            "content_type": 7
+        }
+    }, 
+    {
+        "pk": 21, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "delete_session", 
+            "name": "Can delete session", 
+            "content_type": 7
+        }
+    }, 
+    {
+        "pk": 22, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "add_site", 
+            "name": "Can add site", 
+            "content_type": 8
+        }
+    }, 
+    {
+        "pk": 23, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "change_site", 
+            "name": "Can change site", 
+            "content_type": 8
+        }
+    }, 
+    {
+        "pk": 24, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "delete_site", 
+            "name": "Can delete site", 
+            "content_type": 8
+        }
+    }, 
+    {
+        "pk": 25, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "add_setting", 
+            "name": "Can add setting", 
+            "content_type": 9
+        }
+    }, 
+    {
+        "pk": 26, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "change_setting", 
+            "name": "Can change setting", 
+            "content_type": 9
+        }
+    }, 
+    {
+        "pk": 27, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "delete_setting", 
+            "name": "Can delete setting", 
+            "content_type": 9
+        }
+    }, 
+    {
+        "pk": 28, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "add_projectbackup", 
+            "name": "Can add project backup", 
+            "content_type": 10
+        }
+    }, 
+    {
+        "pk": 29, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "change_projectbackup", 
+            "name": "Can change project backup", 
+            "content_type": 10
+        }
+    }, 
+    {
+        "pk": 30, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "delete_projectbackup", 
+            "name": "Can delete project backup", 
+            "content_type": 10
+        }
+    }, 
+    {
+        "pk": 31, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "add_issuetype", 
+            "name": "Can add issue type", 
+            "content_type": 11
+        }
+    }, 
+    {
+        "pk": 32, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "change_issuetype", 
+            "name": "Can change issue type", 
+            "content_type": 11
+        }
+    }, 
+    {
+        "pk": 33, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "delete_issuetype", 
+            "name": "Can delete issue type", 
+            "content_type": 11
+        }
+    }, 
+    {
+        "pk": 34, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "add_issueseverity", 
+            "name": "Can add issue severity", 
+            "content_type": 12
+        }
+    }, 
+    {
+        "pk": 35, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "change_issueseverity", 
+            "name": "Can change issue severity", 
+            "content_type": 12
+        }
+    }, 
+    {
+        "pk": 36, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "delete_issueseverity", 
+            "name": "Can delete issue severity", 
+            "content_type": 12
+        }
+    }, 
+    {
+        "pk": 37, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "add_issue", 
+            "name": "Can add issue", 
+            "content_type": 13
+        }
+    }, 
+    {
+        "pk": 40, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "can_edit_issue_settings", 
+            "name": "Can edit issue settings", 
+            "content_type": 13
+        }
+    }, 
+    {
+        "pk": 38, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "change_issue", 
+            "name": "Can change issue", 
+            "content_type": 13
+        }
+    }, 
+    {
+        "pk": 39, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "delete_issue", 
+            "name": "Can delete issue", 
+            "content_type": 13
+        }
+    }, 
+    {
+        "pk": 41, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "add_issuestatus", 
+            "name": "Can add issue status", 
+            "content_type": 14
+        }
+    }, 
+    {
+        "pk": 42, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "change_issuestatus", 
+            "name": "Can change issue status", 
+            "content_type": 14
+        }
+    }, 
+    {
+        "pk": 43, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "delete_issuestatus", 
+            "name": "Can delete issue status", 
+            "content_type": 14
+        }
+    }, 
+    {
+        "pk": 44, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "add_project", 
+            "name": "Can add project", 
+            "content_type": 15
+        }
+    }, 
+    {
+        "pk": 47, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "can_edit_project_settings", 
+            "name": "Can edit project settings", 
+            "content_type": 15
+        }
+    }, 
+    {
+        "pk": 45, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "change_project", 
+            "name": "Can change project", 
+            "content_type": 15
+        }
+    }, 
+    {
+        "pk": 46, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "delete_project", 
+            "name": "Can delete project", 
+            "content_type": 15
+        }
+    }, 
+    {
+        "pk": 48, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "add_projectnews", 
+            "name": "Can add project news item", 
+            "content_type": 16
+        }
+    }, 
+    {
+        "pk": 49, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "change_projectnews", 
+            "name": "Can change project news item", 
+            "content_type": 16
+        }
+    }, 
+    {
+        "pk": 50, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "delete_projectnews", 
+            "name": "Can delete project news item", 
+            "content_type": 16
+        }
+    }, 
+    {
+        "pk": 51, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "add_projectpermissionset", 
+            "name": "Can add project permission set", 
+            "content_type": 17
+        }
+    }, 
+    {
+        "pk": 52, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "change_projectpermissionset", 
+            "name": "Can change project permission set", 
+            "content_type": 17
+        }
+    }, 
+    {
+        "pk": 53, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "delete_projectpermissionset", 
+            "name": "Can delete project permission set", 
+            "content_type": 17
+        }
+    }, 
+    {
+        "pk": 54, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "add_repo", 
+            "name": "Can add repo", 
+            "content_type": 18
+        }
+    }, 
+    {
+        "pk": 57, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "can_edit_repo_settings", 
+            "name": "Can edit repo settings", 
+            "content_type": 18
+        }
+    }, 
+    {
+        "pk": 55, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "change_repo", 
+            "name": "Can change repo", 
+            "content_type": 18
+        }
+    }, 
+    {
+        "pk": 56, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "delete_repo", 
+            "name": "Can delete repo", 
+            "content_type": 18
+        }
+    }, 
+    {
+        "pk": 58, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "add_page", 
+            "name": "Can add page", 
+            "content_type": 19
+        }
+    }, 
+    {
+        "pk": 59, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "change_page", 
+            "name": "Can change page", 
+            "content_type": 19
+        }
+    }, 
+    {
+        "pk": 60, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "delete_page", 
+            "name": "Can delete page", 
+            "content_type": 19
+        }
+    }, 
+    {
+        "pk": 61, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "add_pagechange", 
+            "name": "Can add page change", 
+            "content_type": 20
+        }
+    }, 
+    {
+        "pk": 62, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "change_pagechange", 
+            "name": "Can change page change", 
+            "content_type": 20
+        }
+    }, 
+    {
+        "pk": 63, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "delete_pagechange", 
+            "name": "Can delete page change", 
+            "content_type": 20
+        }
+    }, 
+    {
+        "pk": 64, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "add_registrationprofile", 
+            "name": "Can add registration profile", 
+            "content_type": 21
+        }
+    }, 
+    {
+        "pk": 65, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "change_registrationprofile", 
+            "name": "Can change registration profile", 
+            "content_type": 21
+        }
+    }, 
+    {
+        "pk": 66, 
+        "model": "auth.permission", 
+        "fields": {
+            "codename": "delete_registrationprofile", 
+            "name": "Can delete registration profile", 
+            "content_type": 21
+        }
+    }, 
+    {
+        "pk": 6, 
+        "model": "contenttypes.contenttype", 
+        "fields": {
+            "model": "contenttype", 
+            "name": "content type", 
+            "app_label": "contenttypes"
+        }
+    }, 
+    {
+        "pk": 3, 
+        "model": "contenttypes.contenttype", 
+        "fields": {
+            "model": "group", 
+            "name": "group", 
+            "app_label": "auth"
+        }
+    }, 
+    {
+        "pk": 13, 
+        "model": "contenttypes.contenttype", 
+        "fields": {
+            "model": "issue", 
+            "name": "issue", 
+            "app_label": "issue"
+        }
+    }, 
+    {
+        "pk": 12, 
+        "model": "contenttypes.contenttype", 
+        "fields": {
+            "model": "issueseverity", 
+            "name": "issue severity", 
+            "app_label": "issue"
+        }
+    }, 
+    {
+        "pk": 14, 
+        "model": "contenttypes.contenttype", 
+        "fields": {
+            "model": "issuestatus", 
+            "name": "issue status", 
+            "app_label": "issue"
+        }
+    }, 
+    {
+        "pk": 11, 
+        "model": "contenttypes.contenttype", 
+        "fields": {
+            "model": "issuetype", 
+            "name": "issue type", 
+            "app_label": "issue"
+        }
+    }, 
+    {
+        "pk": 1, 
+        "model": "contenttypes.contenttype", 
+        "fields": {
+            "model": "logentry", 
+            "name": "log entry", 
+            "app_label": "admin"
+        }
+    }, 
+    {
+        "pk": 2, 
+        "model": "contenttypes.contenttype", 
+        "fields": {
+            "model": "message", 
+            "name": "message", 
+            "app_label": "auth"
+        }
+    }, 
+    {
+        "pk": 19, 
+        "model": "contenttypes.contenttype", 
+        "fields": {
+            "model": "page", 
+            "name": "page", 
+            "app_label": "wiki"
+        }
+    }, 
+    {
+        "pk": 20, 
+        "model": "contenttypes.contenttype", 
+        "fields": {
+            "model": "pagechange", 
+            "name": "page change", 
+            "app_label": "wiki"
+        }
+    }, 
+    {
+        "pk": 5, 
+        "model": "contenttypes.contenttype", 
+        "fields": {
+            "model": "permission", 
+            "name": "permission", 
+            "app_label": "auth"
+        }
+    }, 
+    {
+        "pk": 15, 
+        "model": "contenttypes.contenttype", 
+        "fields": {
+            "model": "project", 
+            "name": "project", 
+            "app_label": "project"
+        }
+    }, 
+    {
+        "pk": 10, 
+        "model": "contenttypes.contenttype", 
+        "fields": {
+            "model": "projectbackup", 
+            "name": "project backup", 
+            "app_label": "backup"
+        }
+    }, 
+    {
+        "pk": 16, 
+        "model": "contenttypes.contenttype", 
+        "fields": {
+            "model": "projectnews", 
+            "name": "project news item", 
+            "app_label": "project"
+        }
+    }, 
+    {
+        "pk": 17, 
+        "model": "contenttypes.contenttype", 
+        "fields": {
+            "model": "projectpermissionset", 
+            "name": "project permission set", 
+            "app_label": "project"
+        }
+    }, 
+    {
+        "pk": 21, 
+        "model": "contenttypes.contenttype", 
+        "fields": {
+            "model": "registrationprofile", 
+            "name": "registration profile", 
+            "app_label": "registration"
+        }
+    }, 
+    {
+        "pk": 18, 
+        "model": "contenttypes.contenttype", 
+        "fields": {
+            "model": "repo", 
+            "name": "repo", 
+            "app_label": "repo"
+        }
+    }, 
+    {
+        "pk": 7, 
+        "model": "contenttypes.contenttype", 
+        "fields": {
+            "model": "session", 
+            "name": "session", 
+            "app_label": "sessions"
+        }
+    }, 
+    {
+        "pk": 9, 
+        "model": "contenttypes.contenttype", 
+        "fields": {
+            "model": "setting", 
+            "name": "setting", 
+            "app_label": "config"
+        }
+    }, 
+    {
+        "pk": 8, 
+        "model": "contenttypes.contenttype", 
+        "fields": {
+            "model": "site", 
+            "name": "site", 
+            "app_label": "sites"
+        }
+    }, 
+    {
+        "pk": 4, 
+        "model": "contenttypes.contenttype", 
+        "fields": {
+            "model": "user", 
+            "name": "user", 
+            "app_label": "auth"
+        }
+    }, 
+    {
+        "pk": "76452ae7ab8d3d3f876ed29a1217f360", 
+        "model": "sessions.session", 
+        "fields": {
+            "expire_date": "2008-04-05 13:18:06", 
+            "session_data": "gAJ9cQEoVRJfYXV0aF91c2VyX2JhY2tlbmRxAlUpZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5k\ncy5Nb2RlbEJhY2tlbmRxA1UNX2F1dGhfdXNlcl9pZHEESwF1LjEzZWM3MTFjYWE2ZWJlYzU0ZWY2\nOTdlY2VjYjMyMmU3\n"
+        }
+    }, 
+    {
+        "pk": "7304d2c0b47285c0f4f752eef6e554bf", 
+        "model": "sessions.session", 
+        "fields": {
+            "expire_date": "2008-04-05 13:18:41", 
+            "session_data": "gAJ9cQEoVRJfYXV0aF91c2VyX2JhY2tlbmRxAlUpZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5k\ncy5Nb2RlbEJhY2tlbmRxA1UNX2F1dGhfdXNlcl9pZHEESwF1LjEzZWM3MTFjYWE2ZWJlYzU0ZWY2\nOTdlY2VjYjMyMmU3\n"
+        }
+    }, 
+    {
+        "pk": "018e2d72d7bb7a09e41d1ee998d6f085", 
+        "model": "sessions.session", 
+        "fields": {
+            "expire_date": "2008-04-05 13:19:42", 
+            "session_data": "gAJ9cQEoVRJfYXV0aF91c2VyX2JhY2tlbmRxAlUpZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5k\ncy5Nb2RlbEJhY2tlbmRxA1UNX2F1dGhfdXNlcl9pZHEESwF1LjEzZWM3MTFjYWE2ZWJlYzU0ZWY2\nOTdlY2VjYjMyMmU3\n"
+        }
+    }, 
+    {
+        "pk": "21d7673d8c66904aa047d69fa7fd2172", 
+        "model": "sessions.session", 
+        "fields": {
+            "expire_date": "2008-04-05 13:20:25", 
+            "session_data": "gAJ9cQEoVRJfYXV0aF91c2VyX2JhY2tlbmRxAlUpZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5k\ncy5Nb2RlbEJhY2tlbmRxA1UNX2F1dGhfdXNlcl9pZHEESwF1LjEzZWM3MTFjYWE2ZWJlYzU0ZWY2\nOTdlY2VjYjMyMmU3\n"
+        }
+    }, 
+    {
+        "pk": "8d448101416c81ce65faef5231c3cd99", 
+        "model": "sessions.session", 
+        "fields": {
+            "expire_date": "2008-04-05 13:21:29", 
+            "session_data": "gAJ9cQEoVRJfYXV0aF91c2VyX2JhY2tlbmRxAlUpZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5k\ncy5Nb2RlbEJhY2tlbmRxA1UNX2F1dGhfdXNlcl9pZHEESwF1LjEzZWM3MTFjYWE2ZWJlYzU0ZWY2\nOTdlY2VjYjMyMmU3\n"
+        }
+    }, 
+    {
+        "pk": "812ca198c198ad38d5b51cb287d95bcf", 
+        "model": "sessions.session", 
+        "fields": {
+            "expire_date": "2008-04-05 13:22:06", 
+            "session_data": "gAJ9cQEoVQp0ZXN0Y29va2llcQJVBndvcmtlZHEDVRJfYXV0aF91c2VyX2JhY2tlbmRxBFUpZGph\nbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5kcy5Nb2RlbEJhY2tlbmRxBVUNX2F1dGhfdXNlcl9pZHEG\nSwF1LjY1OWUxYjdlOTkxMzExN2MyNzI3NzMwNjdjM2Q4NDky\n"
+        }
+    }, 
+    {
+        "pk": "444b352b8b0a2da226e63efb0a056935", 
+        "model": "sessions.session", 
+        "fields": {
+            "expire_date": "2008-04-05 13:22:28", 
+            "session_data": "gAJ9cQEoVRJfYXV0aF91c2VyX2JhY2tlbmRxAlUpZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5k\ncy5Nb2RlbEJhY2tlbmRxA1UNX2F1dGhfdXNlcl9pZHEESwF1LjEzZWM3MTFjYWE2ZWJlYzU0ZWY2\nOTdlY2VjYjMyMmU3\n"
+        }
+    }, 
+    {
+        "pk": "508866632c6f3c4246fd3799995dc5c0", 
+        "model": "sessions.session", 
+        "fields": {
+            "expire_date": "2008-04-05 13:22:38", 
+            "session_data": "gAJ9cQEoVRJfYXV0aF91c2VyX2JhY2tlbmRxAlUpZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5k\ncy5Nb2RlbEJhY2tlbmRxA1UNX2F1dGhfdXNlcl9pZHEESwF1LjEzZWM3MTFjYWE2ZWJlYzU0ZWY2\nOTdlY2VjYjMyMmU3\n"
+        }
+    }, 
+    {
+        "pk": "fec8ad6ccee8dd6f41edbd8521894058", 
+        "model": "sessions.session", 
+        "fields": {
+            "expire_date": "2008-04-05 13:44:45", 
+            "session_data": "gAJ9cQEoVRJfYXV0aF91c2VyX2JhY2tlbmRxAlUpZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5k\ncy5Nb2RlbEJhY2tlbmRxA1UNX2F1dGhfdXNlcl9pZHEESwF1LjEzZWM3MTFjYWE2ZWJlYzU0ZWY2\nOTdlY2VjYjMyMmU3\n"
+        }
+    }, 
+    {
+        "pk": 1, 
+        "model": "sites.site", 
+        "fields": {
+            "domain": "example.com", 
+            "name": "example.com"
+        }
+    }, 
+    {
+        "pk": 1, 
+        "model": "config.setting", 
+        "fields": {
+            "class_name": "Issue", 
+            "module_name": "hgfront.issue.models", 
+            "attribute_name": "issues_per_page", 
+            "site": 1, 
+            "value": "20"
+        }
+    }, 
+    {
+        "pk": 2, 
+        "model": "config.setting", 
+        "fields": {
+            "class_name": "Project", 
+            "module_name": "hgfront.project.models", 
+            "attribute_name": "repository_directory", 
+            "site": 1, 
+            "value": "\/home\/alisic\/repos"
+        }
+    }, 
+    {
+        "pk": 3, 
+        "model": "config.setting", 
+        "fields": {
+            "class_name": "Project", 
+            "module_name": "hgfront.project.models", 
+            "attribute_name": "site_owner", 
+            "site": 1, 
+            "value": "the site own0r"
+        }
+    }, 
+    {
+        "pk": 4, 
+        "model": "config.setting", 
+        "fields": {
+            "class_name": "Project", 
+            "module_name": "hgfront.project.models", 
+            "attribute_name": "backups_directory", 
+            "site": 1, 
+            "value": "\/home\/alisic\/repos"
+        }
+    }, 
+    {
+        "pk": 5, 
+        "model": "config.setting", 
+        "fields": {
+            "class_name": "Project", 
+            "module_name": "hgfront.project.models", 
+            "attribute_name": "backups_max_days", 
+            "site": 1, 
+            "value": "0"
+        }
+    }, 
+    {
+        "pk": 6, 
+        "model": "config.setting", 
+        "fields": {
+            "class_name": "Issue", 
+            "module_name": "hgfront.issue.models", 
+            "attribute_name": "issue_from_email", 
+            "site": 1, 
+            "value": "bla@bla.com"
+        }
+    }, 
+    {
+        "pk": 7, 
+        "model": "config.setting", 
+        "fields": {
+            "class_name": "Project", 
+            "module_name": "hgfront.project.models", 
+            "attribute_name": "site_name", 
+            "site": 1, 
+            "value": "The site name"
+        }
+    }, 
+    {
+        "pk": 8, 
+        "model": "config.setting", 
+        "fields": {
+            "class_name": "Repo", 
+            "module_name": "hgfront.repo.models", 
+            "attribute_name": "default_style", 
+            "site": 1, 
+            "value": "default"
+        }
+    }, 
+    {
+        "pk": 1, 
+        "model": "issue.issuetype", 
+        "fields": {
+            "order": 0, 
+            "is_active": true, 
+            "slug": "bug", 
+            "title": "Bug"
+        }
+    }, 
+    {
+        "pk": 2, 
+        "model": "issue.issuetype", 
+        "fields": {
+            "order": 1, 
+            "is_active": true, 
+            "slug": "enhancement", 
+            "title": "Enhancement"
+        }
+    }, 
+    {
+        "pk": 3, 
+        "model": "issue.issuetype", 
+        "fields": {
+            "order": 2, 
+            "is_active": true, 
+            "slug": "feature-request", 
+            "title": "Feature Request"
+        }
+    }, 
+    {
+        "pk": 4, 
+        "model": "issue.issuetype", 
+        "fields": {
+            "order": 3, 
+            "is_active": true, 
+            "slug": "typo", 
+            "title": "Typo"
+        }
+    }, 
+    {
+        "pk": 1, 
+        "model": "issue.issueseverity", 
+        "fields": {
+            "order": 0, 
+            "is_active": true, 
+            "slug": "minor", 
+            "title": "Minor"
+        }
+    }, 
+    {
+        "pk": 2, 
+        "model": "issue.issueseverity", 
+        "fields": {
+            "order": 1, 
+            "is_active": true, 
+            "slug": "medium", 
+            "title": "Medium"
+        }
+    }, 
+    {
+        "pk": 3, 
+        "model": "issue.issueseverity", 
+        "fields": {
+            "order": 2, 
+            "is_active": true, 
+            "slug": "major", 
+            "title": "Major"
+        }
+    }, 
+    {
+        "pk": 4, 
+        "model": "issue.issueseverity", 
+        "fields": {
+            "order": 3, 
+            "is_active": true, 
+            "slug": "critical", 
+            "title": "Critical"
+        }
+    }, 
+    {
+        "pk": 5, 
+        "model": "issue.issueseverity", 
+        "fields": {
+            "order": 4, 
+            "is_active": true, 
+            "slug": "blocker", 
+            "title": "Blocker"
+        }
+    }, 
+    {
+        "pk": 1, 
+        "model": "issue.issuestatus", 
+        "fields": {
+            "order": 0, 
+            "is_active": true, 
+            "slug": "raised", 
+            "title": "Raised"
+        }
+    }, 
+    {
+        "pk": 2, 
+        "model": "issue.issuestatus", 
+        "fields": {
+            "order": 1, 
+            "is_active": true, 
+            "slug": "accepted", 
+            "title": "Accepted"
+        }
+    }, 
+    {
+        "pk": 3, 
+        "model": "issue.issuestatus", 
+        "fields": {
+            "order": 2, 
+            "is_active": true, 
+            "slug": "not-accepted", 
+            "title": "Not Accepted"
+        }
+    }, 
+    {
+        "pk": 4, 
+        "model": "issue.issuestatus", 
+        "fields": {
+            "order": 3, 
+            "is_active": true, 
+            "slug": "fixed", 
+            "title": "Fixed"
+        }
+    }, 
+    {
+        "pk": 5, 
+        "model": "issue.issuestatus", 
+        "fields": {
+            "order": 4, 
+            "is_active": true, 
+            "slug": "works-for-me", 
+            "title": "Works For Me"
+        }
+    }, 
+    {
+        "pk": 1, 
+        "model": "project.project", 
+        "fields": {
+            "hgweb_style": "default", 
+            "pub_date": "2008-03-22 13:17:36", 
+            "name_short": "manhattan", 
+            "description_long": "no desc", 
+            "user_owner": 4, 
+            "description_short": "no desc", 
+            "name_long": "The Manhattan Project"
+        }
+    }, 
+    {
+        "pk": 2, 
+        "model": "project.project", 
+        "fields": {
+            "hgweb_style": "default", 
+            "pub_date": "2008-03-22 13:17:36", 
+            "name_short": "secret_project", 
+            "description_long": "No one can view this project or do anything with it except the user `charles`, who has all the permissions for it and `johnny`, who is the owner.", 
+            "user_owner": 3, 
+            "description_short": "a secret project", 
+            "name_long": "Secret project"
+        }
+    }, 
+    {
+        "pk": 1, 
+        "model": "project.projectpermissionset", 
+        "fields": {
+            "edit_repos": false, 
+            "project": 1, 
+            "user_accepted": true, 
+            "delete_members": false, 
+            "delete_issues": false, 
+            "view_project": true, 
+            "view_repos": true, 
+            "edit_issues": false, 
+            "edit_project": false, 
+            "edit_wiki": false, 
+            "add_wiki": false, 
+            "is_default": true, 
+            "view_issues": true, 
+            "add_issues": false, 
+            "owner_accepted": true, 
+            "view_wiki": true, 
+            "delete_repos": false, 
+            "add_repos": false, 
+            "delete_wiki": false, 
+            "add_members": false, 
+            "user": null
+        }
+    }, 
+    {
+        "pk": 2, 
+        "model": "project.projectpermissionset", 
+        "fields": {
+            "edit_repos": false, 
+            "project": 2, 
+            "user_accepted": true, 
+            "delete_members": false, 
+            "delete_issues": false, 
+            "view_project": false, 
+            "view_repos": false, 
+            "edit_issues": false, 
+            "edit_project": false, 
+            "edit_wiki": false, 
+            "add_wiki": false, 
+            "is_default": true, 
+            "view_issues": false, 
+            "add_issues": false, 
+            "owner_accepted": true, 
+            "view_wiki": false, 
+            "delete_repos": false, 
+            "add_repos": false, 
+            "delete_wiki": false, 
+            "add_members": false, 
+            "user": null
+        }
+    }, 
+    {
+        "pk": 3, 
+        "model": "project.projectpermissionset", 
+        "fields": {
+            "edit_repos": true, 
+            "project": 2, 
+            "user_accepted": true, 
+            "delete_members": true, 
+            "delete_issues": true, 
+            "view_project": true, 
+            "view_repos": true, 
+            "edit_issues": true, 
+            "edit_project": true, 
+            "edit_wiki": true, 
+            "add_wiki": true, 
+            "is_default": false, 
+            "view_issues": true, 
+            "add_issues": true, 
+            "owner_accepted": true, 
+            "view_wiki": true, 
+            "delete_repos": true, 
+            "add_repos": true, 
+            "delete_wiki": true, 
+            "add_members": true, 
+            "user": 2
+        }
+    }, 
+    {
+        "pk": 1, 
+        "model": "wiki.page", 
+        "fields": {
+            "content": "This is the main wiki page for this project, write something here!", 
+            "parent_project": 1, 
+            "name": "Main_Page"
+        }
+    }, 
+    {
+        "pk": 2, 
+        "model": "wiki.page", 
+        "fields": {
+            "content": "This is the main wiki page for this project, write something here!", 
+            "parent_project": 2, 
+            "name": "Main_Page"
+        }
+    }
+]

hgfront/queue/__init__.py

Empty file added.

hgfront/queue/models.py

+import datetime
+from django.db import models
+
+class Queue(models.Model):
+    """
+    """
+    name = models.CharField(max_length=255, unique=True, db_index=True)
+    default_expire = models.PositiveIntegerField(default=5, help_text="In minutes.")
+
+    def __str__(self):
+        return self.name
+
+    class Admin:
+        pass
+
+class MessageManager(models.Manager):
+    def pop(self, queue=None, expire_interval=5):
+        """ returns a visible Message if available, or None. Any Message
+        returned is set to 'invisible', so that future pop() invocations won't 
+        retrieve it until after an expiration time (default of 5 minutes).
+        
+        queue can either be the name of a queue or an instance of Queue.
+        """
+        try:
+            if queue is None:
+                # The following code allows us to do:
+                # q.message_set.pop() when we already have an instance of q at hand
+                f = self
+            else:
+                f = isinstance(queue, Queue) and queue.message_set or \
+                                             self.filter(queue__name=queue)
+            result = f.filter(visible=True).order_by('timestamp', 'id')[0:1].get()
+            result.visible = False
+            result.expires = datetime.datetime.now() + datetime.timedelta(minutes=expire_interval)
+            result.save()
+            return result
+        except Message.DoesNotExist:
+            return None
+
+    def clear_expirations(self, queue):
+        """
+        Changes visibility to True for messages whose expiration time has elapsed.
+        queue can either be the name of a queue or an instance of Queue.
+        """
+        q = isinstance(queue, Queue) and queue or Queue.objects.get(name=queue)
+        from django.db import connection, transaction, DatabaseError
+        cursor = connection.cursor()
+        try:
+            cursor.execute("UPDATE %s set expires=%%s, visible=%%s \
+                       where queue_id=%%s and visible=%%s and \
+                       expires < %%s" % self.model._meta.db_table, 
+                       [None, True, q.id, False, datetime.datetime.now()])
+        except DatabaseError:
+            # @RD: For thread safety: these updates could be allowed to fail silently
+            # @RD: Perhaps, this isn't needed.
+            pass
+        else:
+            transaction.commit_unless_managed()
+        return None
+
+class Message(models.Model):
+    """
+    """
+    message = models.TextField()
+    visible = models.BooleanField(default=True, db_index=True)
+    expires = models.DateTimeField(null=True, blank=True, db_index=True,
+                help_text="After this time has elapsed, the visibility of the message \
+                           is changed back from False to True (when clear_expirations is executed).")
+    timestamp = models.DateTimeField(null=True, blank=True, db_index=True, default=datetime.datetime.now)
+    queue = models.ForeignKey(Queue, raw_id_admin=True)
+    objects = MessageManager()
+    
+    def save(self):
+        if not self.id:
+            self.timestamp = datetime.datetime.now()
+        super(Message, self).save()
+    
+    def __str__(self):
+        return "QM<%s> : %s" % (self.id, self.message)
+            
+    class Admin:
+        pass
+

hgfront/queue/templates/404.html

+Not Found

hgfront/queue/templates/500.html

+Server Error

hgfront/queue/templates/queue/base_generic.html

+{% load i18n %}
+{% comment %}
+This is the root template for the entire site.
+
+Context variables expected:
+		user.is_anonymous
+
+This has the default page title, site visual, top utility links, and bottom utility links.
+{% endcomment %}
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<title>{% block title %}{% trans "Message Queue" %}{% endblock %}</title>
+{% block default_head %}<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />{% endblock %}{% block extrahead %}{% endblock %}
+</head>
+<body>{% block main_body %}{% endblock %}</body>
+</html>
+

hgfront/queue/templates/queue/put.html

+{% extends "queue/base_generic.html" %}
+{% block main_body %}
+hi there
+{% endblock %}

hgfront/queue/templatetags/__init__.py

+

hgfront/queue/templatetags/queue.py

+

hgfront/queue/tests.py

+from django.test import TestCase
+from queue.models import Queue, Message
+from django.test.utils import create_test_db, destroy_test_db
+
+
+class CreateMessageCase(TestCase):
+    def setUp( self ):
+        Queue.objects.create( name='default', default_expire=5)
+        Queue.objects.create( name='primary', default_expire=5)
+        Queue.objects.create( name='secondary', default_expire=5)
+
+    def testQueue( self ):
+        assert Queue.objects.all().count() == 3
+
+    def testDefaultValues( self ):
+        dq = Queue.objects.get( name='default' )
+        x = Message( message="hello",queue=dq )
+        x.save()
+        self.failUnlessEqual( x.message, 'hello' )
+        self.failIfEqual( x.timestamp, None )
+        self.failUnlessEqual(x.visible, True)
+        
+        x = Message(queue=dq)
+        x.save()
+        self.failUnlessEqual( x.message, '' )
+        self.failUnlessEqual( x.visible, True )
+
+    def testDefaultExpire( self ):
+        Queue(name="test_queue").save()
+        tq = Queue.objects.get( name='test_queue' )
+        self.failUnlessEqual( tq.default_expire, 5)
+        
+        
+    def testMessageOrder( self ):
+        import random
+        random.seed()
+
+        count = random.randint(100, 200)
+        input = [ '%d' % random.randint(0,count) for x in range(count) ]
+        dq = Queue.objects.get ( name='default' )
+
+        for message in input:        
+            Message.objects.create( message=message, queue=dq, visible=True )
+        output = [ Message.objects.pop( 'default' ).message for x in range(count)]
+        
+        ## verify FIFO
+        self.failUnlessEqual( output, input )
+
+    def testVisibleCount( self ):
+        dq = Queue.objects.get ( name='default' )
+        
+        ## Add 50
+        for x in range(50):
+            Message.objects.create( queue=dq )
+            
+        ## Subtract 20
+        for x in range(20):
+            Message.objects.pop('default')
+            
+        self.failUnlessEqual(len(Message.objects.filter(visible=True)), 30)        
+        self.failUnlessEqual(len(Message.objects.filter(visible=False)), 20)        
+      
+        
+from django.test.client import Client
+
+class SimpleTest(TestCase):
+    def setUp(self):
+        # Every test needs a client.
+        self.client = Client()
+
+    def test_qCreation(self):
+        response = self.client.post('/createqueue/', dict( name='web_test'))
+        self.failUnlessEqual(200, response.status_code)
+
+        response = self.client.get('/listqueues/')
+        self.failUnlessEqual( ['web_test'], eval( response.content) )
+
+    def test_qMessage( self ):
+        # First create the queue
+        response = self.client.post('/createqueue/', dict( name='web_test'))
+        self.failUnlessEqual(200, response.status_code)
+
+        response = self.client.post('/q/web_test/put/', { 'message' : 'Hello Web!' })
+        self.failUnlessEqual(200, response.status_code)
+
+        response = self.client.get('/q/web_test/count/')
+        self.failUnlessEqual(200, response.status_code)
+        self.failUnlessEqual( '1', response.content )
+
+        response = self.client.get('/q/web_test/')
+        self.failUnlessEqual(200, response.status_code)
+        self.failUnlessEqual( 'Hello Web!', response.content )
+
+    def test_allowed_methods(self):
+        '''Issues a POST where a GET is expected (and vice-versa) 
+and verifies that a 403:Forbidden response code is received.'''
+        response =  self.client.post('/listqueues/')
+        self.failUnlessEqual(403, response.status_code)
+
+        # Create the queue needed by the next few tests
+        response = self.client.post('/createqueue/', dict(name='web_test'))
+        self.failUnlessEqual(200, response.status_code)
+
+        response = self.client.post('/q/web_test/')
+        self.failUnlessEqual(403, response.status_code)
+
+        response = self.client.get('/q/web_test/put/', {'message':'Hello Web!'})
+        self.failUnlessEqual(403, response.status_code)
+

hgfront/queue/urls.py

+from django.conf.urls.defaults import *
+
+urlpatterns = patterns('hgfront.queue.views',
+    (r'^createqueue/$', 'create_queue'), #post 'name' of queue
+    (r'^deletequeue/$', 'delete_queue'), #post 'name' of queue
+    (r'^purgequeue/$', 'purge_queue'),   #post 'name' of queue
+    (r'^listqueues/$', 'list_queues'),
+    
+    (r'^q/(?P<queue_name>\w+)/put/$', 'put'),
+    (r'^q/(?P<queue_name>\w+)/clearexpire/$', 'clear_expirations'),
+    (r'^q/(?P<queue_name>\w+)/count/json/$', 'count', {"response_type":"json"}),
+    (r'^q/(?P<queue_name>\w+)/count/$', 'count', {"response_type":"text"}),
+    (r'^q/(?P<queue_name>\w+)/delete/$', 'delete'), #post 'message_id' of msg
+    (r'^q/(?P<queue_name>\w+)/json/$', 'get', {"response_type":"json"}),
+    (r'^q/(?P<queue_name>\w+)/$', 'get', {"response_type":"text"}),
+)

hgfront/queue/views.py

+# Create your views here.
+from django.utils import simplejson
+from hgfront.queue.models import Message, Queue
+from django.http import HttpResponseRedirect
+from django.http import HttpResponse
+from django.http import HttpResponseForbidden
+from django.http import HttpResponseNotAllowed
+from django.http import HttpResponseNotFound
+from django import newforms as forms
+from django.shortcuts import render_to_response
+from django.template import RequestContext
+import datetime
+
+
+def check_allowed_methods(methods=['GET']):
+    '''Convenient decorator that verifies that a view is being called with 
+an allowed set of request methods and no others.
+Returns HttpResponseForbidden if view is called with a disallowed method.'''
+    def _decorator(view_func):
+        def _wrapper(request, *args, **kwargs):
+            if request.method in methods:
+                return view_func(request, *args, **kwargs)
+            else:
+                return HttpResponseForbidden()
+        _wrapper.__doc__ = view_func.__doc__
+        _wrapper.__dict__ = view_func.__dict__
+        return _wrapper
+    return _decorator
+
+# Queue Methods
+@check_allowed_methods(['POST'])
+def create_queue(request):
+    # test post with
+    # curl -i http://localhost:8000/createqueue/ -d name=default
+    requested_name = request.POST.get('name', None)
+    if requested_name is None:
+        return HttpResponseForbidden()
+    q = Queue(name=requested_name)
+    q.save()
+    return HttpResponse("", mimetype='text/plain')
+
+@check_allowed_methods(['POST', 'DELETE'])
+def delete_queue(request):
+    # test post with
+    # curl -i http://localhost:8000/deletequeue/ -d name=default
+    requested_name = request.POST.get('name', None)
+    if requested_name is None:
+        return HttpResponseForbidden()
+    try:
+        q = Queue.objects.get(name=requested_name)
+        if q.message_set.count() > 0:
+            return HttpResponseNotAllowed()
+        q.delete()
+        return HttpResponse("", mimetype='text/plain')
+    except Queue.DoesNotExist:
+        return HttpResponseNotFound()
+
+@check_allowed_methods(['POST'])
+def purge_queue(request):
+    # test post with
+    # curl -i http://localhost:8000/purgequeue/ -d name=default
+    requested_name = request.POST.get('name', None)
+    if requested_name is None:
+        return HttpResponseForbidden()
+    try:
+        q = Queue.objects.get(name=requested_name)
+        q.message_set.all().delete()
+        return HttpResponse("", mimetype='text/plain')
+    except Queue.DoesNotExist:
+        return HttpResponseNotFound()
+
+@check_allowed_methods(['GET'])
+def list_queues(request):
+    # test post with
+    # curl -i http://localhost:8000/listqueues/
+    result_list = []
+    for queue in Queue.objects.all():
+        result_list.append(queue.name)
+    return HttpResponse(simplejson.dumps(result_list), mimetype='application/json')
+
+#
+# Message methods - all of these will be operating on messages against a queue...
+#
+
+@check_allowed_methods(['GET'])
+def get(request, queue_name, response_type='text'):
+    # test count with
+    # curl -i http://localhost:8000/q/default/
+    # curl -i http://localhost:8000/q/default/json/
+    
+    # print "GET queue_name is %s" % queue_name
+    q = None
+    # pre-emptive queue name checking...
+    try:
+        q = Queue.objects.get(name=queue_name)
+    except Queue.DoesNotExist:
+        return HttpResponseNotFound()
+    #
+    msg = q.message_set.pop()
+    if response_type == 'json':
+        msg_dict = {}
+        if msg:
+            msg_dict['message'] = msg.message
+            msg_dict['id'] = msg.id
+        return HttpResponse(simplejson.dumps(msg_dict), mimetype='application/json')
+    else:
+        response_data = ''
+        if msg:
+            response_data = msg.message
+        return HttpResponse(response_data, mimetype='text/plain')
+
+#@check_allowed_methods(['POST'])
+def clear_expirations(request, queue_name):
+    # test count with
+    # curl -i http://localhost:8000/q/default/clearexpire/
+    # @TODO: This should only work with a POST as the following code changes data
+    try:
+        Message.objects.clear_expirations(queue_name)
+        return HttpResponse("", mimetype='text/plain')
+    except Queue.DoesNotExist:
+        return HttpResponseNotFound()
+
+@check_allowed_methods(['GET'])
+def count(request, queue_name, response_type='text'):
+    # test count with
+    # curl -i http://localhost:8000/q/default/count/
+    # curl -i http://localhost:8000/q/default/count/json/
+    try:
+        q = Queue.objects.get(name=queue_name)
+        num_visible = q.message_set.filter(visible=True).count()
+        if response_type == 'json':
+            msg_dict = {"count":"%s" % num_visible}
+            return HttpResponse(simplejson.dumps(msg_dict), mimetype='application/json')
+        else:
+            return HttpResponse("%s" % num_visible, mimetype='text/plain')
+    except Queue.DoesNotExist:
+        return HttpResponseNotFound()
+
+@check_allowed_methods(['POST', 'DELETE'])
+def delete(request, queue_name):
+    # test post with
+    # curl -i http://localhost:8000/q/default/delete/ -d message_id=1
+    #print "deleting: %s" % message_id
+    message_id=request.POST['message_id']
+    try:
+        q = Queue.objects.get(name=queue_name)
+        msg = q.message_set.get(pk=message_id)
+        msg.delete()
+        return HttpResponse("OK", mimetype='text/plain')
+    except Queue.DoesNotExist:
+        return HttpResponseNotFound()
+    except Message.DoesNotExist:
+        return HttpResponseNotFound()
+
+@check_allowed_methods(['POST'])
+def put(request, queue_name):
+    # test post with
+    # curl -i http://localhost:8000/q/default/put/ -d message=hello
+    try:
+        q = Queue.objects.get(name=queue_name)
+        msg = Message(message=request.POST['message'], queue=q)
+        msg.save()
+        return HttpResponse("OK", mimetype='text/plain')
+    except Queue.DoesNotExist:
+        return HttpResponseNotFound()
+

hgfront/repo/models.py

 
 
 # Dispatchers
-dispatcher.connect( create_repo , signal=signals.post_save, sender=Repo )
-dispatcher.connect( delete_repo , signal=signals.post_delete, sender=Repo )
+#dispatcher.connect( create_repo , signal=signals.post_save, sender=Repo )
+#dispatcher.connect( delete_repo , signal=signals.post_delete, sender=Repo )

hgfront/repo/urls.py

     url('^(?P<repo_name>[-\w]+)/$', 'view_changeset', name='view-tip'),
     url('^(?P<repo_name>[-\w]+)/changeset/(?P<changeset>[-\w]+)/$', 'view_changeset', name='view-changeset'),
     url('^(?P<repo_name>[-\w]+)/manage/$', 'repo_manage', name='repo-manage'),
+    url('^(?P<repo_name>[-\w]+)/action/(?P<action>[-\w]+)$', 'repo_action', name='repo-action'),
 )

hgfront/repo/views.py

 from django.conf import settings
 from django.contrib.auth.models import User
 from django.core.urlresolvers import reverse
-from django.http import HttpResponse, HttpResponseRedirect
+from django.http import HttpResponseRedirect
+from django.http import HttpResponse
+from django.http import HttpResponseForbidden
+from django.http import HttpResponseNotAllowed
+from django.http import HttpResponseNotFound
 from django.shortcuts import get_object_or_404, render_to_response
 from django.template import RequestContext
+from django.utils import simplejson
 # Project Libraries
 from hgfront.project.models import Project
 from hgfront.repo.forms import RepoCreateForm
 from hgfront.repo.models import Repo
 from hgfront.project.decorators import check_project_permissions
+from hgfront.queue.models import Message, Queue
 
 @check_project_permissions('view_repos')
 def repo_list(request, slug):
         repo = Repo(parent_project=project, pub_date=datetime.datetime.now())
         form = RepoCreateForm(request.POST, instance=repo)
         if form.is_valid():
-            form.save()
-            request.user.message_set.create(message="The repo has been added! Now start putting code in!")
+            try:
+                q = Queue.objects.get(name='createrepos')
+                msg = Message(message=form.cleaned_data['name_short'], queue=q)
+                msg.save()
+                request.user.message_set.create(message="The repo was not put in the queue.  Contact the administator.")
+                form.save();
+            except Queue.DoesNotExist:
+                 request.user.message_set.create(message="The repo has been added to the queue")
             return HttpResponseRedirect(reverse('project-detail',
                 kwargs={
                     'slug': slug,
-                    'repo_name':request.POST['name_short']})
+                    'repo_name':form.cleaned_data['name_short']})
             )
     else:
         form = RepoCreateForm()
     else:
         return HttpResponse('Failed')
     
+def repo_action(request, slug, repo_name, action):
+    repo = Repo.objects.get(name_short = repo_name, parent_project__name_short = slug)
+    u = ui.ui()
+    r = hg.repository(u, repo.repo_directory())
+    return HttpResponse('Foo Bar')
+    
 #def local_clone(request, slug, repo_name):
 #    if request.method = "POST":
         

hgfront/templates/project/project_detail.html

     
     {% with project.repo_set.select_related as repos %}
         {% if repos %}
-            <table>
-                <thead>
-                    <caption>Repositories {{project.name_long}}</caption>
-                    <tr>
-                        <th>Name</th>
-                        <th>Last Changeset ID</th>
-                        <th>Actions</th>
-                    </tr>
-                </thead>
-                <tbody>
-                    {% for repo in repos %}
-                        <tr>
-                            <td><a href="{{repo.get_absolute_url}}" class="link-show-repo">{{repo.name_long}}</a></td>
-                            <td>
-                                {% ifequal repo.get_changeset_number -1 %}
-                                    No Changesets (please add and commit files).
-                                {% else %}
-                                    {{repo.get_changeset_number}} - {{repo.get_changeset}}
-                                {% endifequal %}
-                            </td>
-                            <td>
-                                <select name="repo-action">
-                                    <option>Clone</option>
-                                    <option>Push</option>
-                                    <option>Pull</option>
-                                    <option>Update</option>
-                                    <option>Merge</option>
-                                    <option>Add</option>
-                                    <option>Remove (files)</option>
-                                    <option>Delete (repo)</option>
-                                </select>
-                            </td>
-                        </tr>
-                    {% endfor %}
-                </tbody>
-            </table>
+			<h2>Repositories {{project.name_long}}</h2>
+			<ul>
+				{% for repo in repos %}
+					<li class="bubbleInfo">
+						<a href="{{repo.get_absolute_url}}" class="link-show-repo">{{repo.name_long}}</a>
+						<div class="popup">
+							<div class="popup-content">
+								<dl>
+									<dt>Last Changeset ID</dt>
+									<dd>
+										 {% ifequal repo.get_changeset_number -1 %}
+	                            	        No Changesets (please add and commit files).
+    	                            	{% else %}
+	                                   		{{repo.get_changeset_number}} - {{repo.get_changeset}}
+	    	                            {% endifequal %}
+									</dd>
+									<dt>Actions</dt>
+									<dd><a href="{{repo.get_absolute_url}}" class="link-show-repo">Open</a></dd>
+									<dd><a href="{% url repo-action %}/fetch/" class="link-update-merge-repo">Fetch</a></dd>
+								</dl>
+							</div>
+						</div>
+					</li>
+	            {% endfor %}
+			</ul>
         {% endif %}
     {% endwith %}
 	    
 	url(r'^config/', include('hgfront.config.urls')),
 	url(r'^u/',include('hgfront.member.urls')),
 	url(r'^s/', include('hgfront.search.urls')),
+	url(r'^q/', include('hgfront.queue.urls')),
 )