]> git.openstreetmap.org Git - osqa.git/commitdiff
Adapts sx importer to the latest code.
authorhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Tue, 8 Jun 2010 23:17:51 +0000 (23:17 +0000)
committerhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Tue, 8 Jun 2010 23:17:51 +0000 (23:17 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@395 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum_modules/sximporter/importer.py
forum_modules/sximporter/orm.py

index adee0d38031bd2751fb392195f5d5286843b0eff..3952e3b344d9a206d199da5e387ff56690017667 100644 (file)
@@ -34,21 +34,21 @@ google_accounts_lookup = re.compile(r'^https?://www.google.com/accounts/')
 yahoo_accounts_lookup = re.compile(r'^https?://me.yahoo.com/a/')\r
 \r
 openid_lookups = [\r
-    re.compile(r'^https?://www.google.com/profiles/(?P<uname>\w+(\.\w+)*)/?$'),\r
-    re.compile(r'^https?://me.yahoo.com/(?P<uname>\w+(\.\w+)*)/?$'),\r
-    re.compile(r'^https?://openid.aol.com/(?P<uname>\w+(\.\w+)*)/?$'),\r
-    re.compile(r'^https?://(?P<uname>\w+(\.\w+)*).myopenid.com/?$'),\r
-    re.compile(r'^https?://flickr.com/(\w+/)*(?P<uname>\w+(\.\w+)*)/?$'),\r
-    re.compile(r'^https?://technorati.com/people/technorati/(?P<uname>\w+(\.\w+)*)/?$'),\r
-    re.compile(r'^https?://(?P<uname>\w+(\.\w+)*).wordpress.com/?$'),\r
-    re.compile(r'^https?://(?P<uname>\w+(\.\w+)*).blogspot.com/?$'),\r
-    re.compile(r'^https?://(?P<uname>\w+(\.\w+)*).livejournal.com/?$'),\r
-    re.compile(r'^https?://claimid.com/(?P<uname>\w+(\.\w+)*)/?$'),\r
-    re.compile(r'^https?://(?P<uname>\w+(\.\w+)*).pip.verisignlabs.com/?$'),\r
-    re.compile(r'^https?://getopenid.com/(?P<uname>\w+(\.\w+)*)/?$'),\r
-    re.compile(r'^https?://[\w\.]+/(\w+/)*(?P<uname>\w+(\.\w+)*)/?$'),\r
-    re.compile(r'^https?://(?P<uname>[\w\.]+)/?$'),\r
-]\r
+        re.compile(r'^https?://www.google.com/profiles/(?P<uname>\w+(\.\w+)*)/?$'),\r
+        re.compile(r'^https?://me.yahoo.com/(?P<uname>\w+(\.\w+)*)/?$'),\r
+        re.compile(r'^https?://openid.aol.com/(?P<uname>\w+(\.\w+)*)/?$'),\r
+        re.compile(r'^https?://(?P<uname>\w+(\.\w+)*).myopenid.com/?$'),\r
+        re.compile(r'^https?://flickr.com/(\w+/)*(?P<uname>\w+(\.\w+)*)/?$'),\r
+        re.compile(r'^https?://technorati.com/people/technorati/(?P<uname>\w+(\.\w+)*)/?$'),\r
+        re.compile(r'^https?://(?P<uname>\w+(\.\w+)*).wordpress.com/?$'),\r
+        re.compile(r'^https?://(?P<uname>\w+(\.\w+)*).blogspot.com/?$'),\r
+        re.compile(r'^https?://(?P<uname>\w+(\.\w+)*).livejournal.com/?$'),\r
+        re.compile(r'^https?://claimid.com/(?P<uname>\w+(\.\w+)*)/?$'),\r
+        re.compile(r'^https?://(?P<uname>\w+(\.\w+)*).pip.verisignlabs.com/?$'),\r
+        re.compile(r'^https?://getopenid.com/(?P<uname>\w+(\.\w+)*)/?$'),\r
+        re.compile(r'^https?://[\w\.]+/(\w+/)*(?P<uname>\w+(\.\w+)*)/?$'),\r
+        re.compile(r'^https?://(?P<uname>[\w\.]+)/?$'),\r
+        ]\r
 \r
 def final_username_attempt(sxu):\r
     openid = sxu.get('openid', None)\r
@@ -120,14 +120,15 @@ def userimport(dump, options):
             uidmapper[-1] = 1\r
             create = False\r
         else:\r
-            username = sxu.get('displayname', sxu.get('displaynamecleaned', sxu.get('realname', final_username_attempt(sxu))))\r
+            username = sxu.get('displayname',\r
+                               sxu.get('displaynamecleaned', sxu.get('realname', final_username_attempt(sxu))))\r
 \r
             if not isinstance(username, UnknownUser) and username in user_by_name:\r
-                #if options.get('mergesimilar', False) and sxu.get('email', 'INVALID') == user_by_name[username].email:\r
-                #    osqau = user_by_name[username]\r
-                #    create = False\r
-                #    uidmapper[sxu.get('id')] = osqau.id\r
-                #else:\r
+            #if options.get('mergesimilar', False) and sxu.get('email', 'INVALID') == user_by_name[username].email:\r
+            #    osqau = user_by_name[username]\r
+            #    create = False\r
+            #    uidmapper[sxu.get('id')] = osqau.id\r
+            #else:\r
                 inc = 1\r
                 while ("%s %d" % (username, inc)) in user_by_name:\r
                     inc += 1\r
@@ -135,50 +136,50 @@ def userimport(dump, options):
                 username = "%s %d" % (username, inc)\r
 \r
         sxbadges = sxu.get('badgesummary', None)\r
-        badges = {'1':'0','2':'0','3':'0'}\r
+        badges = {'1':'0', '2':'0', '3':'0'}\r
 \r
         if sxbadges:\r
             badges.update(dict([b.split('=') for b in sxbadges.split()]))\r
 \r
         if create:\r
             osqau = orm.User(\r
-                id           = sxu.get('id'),\r
-                username     = unicode(username),\r
-                password     = '!',\r
-                email        = sxu.get('email', ''),\r
-                is_superuser = sxu.get('usertypeid') == '5',\r
-                is_staff     = sxu.get('usertypeid') == '4',\r
-                is_active    = True,\r
-                date_joined  = readTime(sxu.get('creationdate')),\r
-                last_seen    = readTime(sxu.get('lastaccessdate')),\r
-                about         = sxu.get('aboutme', ''),\r
-                date_of_birth = sxu.get('birthday', None) and readTime(sxu['birthday']) or None,\r
-                email_isvalid = int(sxu.get('usertypeid')) > 2,\r
-                website       = sxu.get('websiteurl', ''),\r
-                reputation    = int(sxu.get('reputation')),\r
-                gold          = int(badges['1']),\r
-                silver        = int(badges['2']),\r
-                bronze        = int(badges['3']),\r
-                real_name     = sxu.get('realname', ''),\r
-                location      = sxu.get('location', ''),\r
-            )\r
+                    id           = sxu.get('id'),\r
+                    username     = unicode(username),\r
+                    password     = '!',\r
+                    email        = sxu.get('email', ''),\r
+                    is_superuser = sxu.get('usertypeid') == '5',\r
+                    is_staff     = sxu.get('usertypeid') == '4',\r
+                    is_active    = True,\r
+                    date_joined  = readTime(sxu.get('creationdate')),\r
+                    last_seen    = readTime(sxu.get('lastaccessdate')),\r
+                    about         = sxu.get('aboutme', ''),\r
+                    date_of_birth = sxu.get('birthday', None) and readTime(sxu['birthday']) or None,\r
+                    email_isvalid = int(sxu.get('usertypeid')) > 2,\r
+                    website       = sxu.get('websiteurl', ''),\r
+                    reputation    = int(sxu.get('reputation')),\r
+                    gold          = int(badges['1']),\r
+                    silver        = int(badges['2']),\r
+                    bronze        = int(badges['3']),\r
+                    real_name     = sxu.get('realname', ''),\r
+                    location      = sxu.get('location', ''),\r
+                    )\r
 \r
             osqau.save()\r
 \r
             user_joins = orm.Action(\r
-                action_type = "userjoins",\r
-                action_date = osqau.date_joined,\r
-                user = osqau\r
-            )\r
+                    action_type = "userjoins",\r
+                    action_date = osqau.date_joined,\r
+                    user = osqau\r
+                    )\r
             user_joins.save()\r
 \r
             rep = orm.ActionRepute(\r
-                value = 1,\r
-                user = osqau,\r
-                date = osqau.date_joined,\r
-                action = user_joins\r
-            )\r
-            rep.save()            \r
+                    value = 1,\r
+                    user = osqau,\r
+                    date = osqau.date_joined,\r
+                    action = user_joins\r
+                    )\r
+            rep.save()\r
 \r
             try:\r
                 orm.SubscriptionSettings.objects.get(user=osqau)\r
@@ -195,7 +196,8 @@ def userimport(dump, options):
                 else:\r
                     osqau.about = new_about\r
 \r
-            osqau.username = sxu.get('displayname', sxu.get('displaynamecleaned', sxu.get('realname', final_username_attempt(sxu))))\r
+            osqau.username = sxu.get('displayname',\r
+                                     sxu.get('displaynamecleaned', sxu.get('realname', final_username_attempt(sxu))))\r
             osqau.email = sxu.get('email', '')\r
             osqau.reputation += int(sxu.get('reputation'))\r
             osqau.gold += int(badges['1'])\r
@@ -230,17 +232,39 @@ def tagsimport(dump, uidmap):
 \r
     for sxtag in tags:\r
         otag = orm.Tag(\r
-            id = int(sxtag['id']),\r
-            name = sxtag['name'],\r
-            used_count = int(sxtag['count']),\r
-            created_by_id = uidmap[sxtag.get('userid', 1)],\r
-        )\r
+                id = int(sxtag['id']),\r
+                name = sxtag['name'],\r
+                used_count = int(sxtag['count']),\r
+                created_by_id = uidmap[sxtag.get('userid', 1)],\r
+                )\r
         otag.save()\r
 \r
         tagmap[otag.name] = otag\r
 \r
     return tagmap\r
 \r
+def add_post_state(name, post, action):\r
+    if not "(%s)" % name in post.state_string:\r
+        post.state_string = "%s(%s)" % (post.state_string, name)\r
+        post.save()\r
+\r
+    try:\r
+        state = orm.NodeState.objects.get(node=post, state_type=name)\r
+        state.action = action\r
+        state.save()\r
+    except:\r
+        state = orm.NodeState(node=post, state_type=name, action=action)\r
+        state.save()\r
+\r
+def remove_post_state(name, post):\r
+    if "(%s)" % name in post.state_string:\r
+        try:\r
+            state = orm.NodeState.objects.get(state_type=name, post=post)\r
+            state.delete()\r
+        except:\r
+            pass\r
+    post.state_string = "".join("(%s)" % s for s in re.findall('\w+', post.state_string) if s != name)\r
+\r
 def postimport(dump, uidmap, tagmap):\r
     history = {}\r
     accepted = {}\r
@@ -258,65 +282,51 @@ def postimport(dump, uidmap, tagmap):
         nodetype = (sxpost.get('posttypeid') == '1') and "nodetype" or "answer"\r
 \r
         post = orm.Node(\r
-            node_type = nodetype,\r
-            id = sxpost['id'],\r
-            added_at = readTime(sxpost['creationdate']),\r
-            body = sxpost['body'],\r
-            score = sxpost.get('score', 0),\r
-            author_id = sxpost.get('deletiondate', None) and 1 or uidmap[sxpost['owneruserid']]\r
-        )\r
+                node_type = nodetype,\r
+                id = sxpost['id'],\r
+                added_at = readTime(sxpost['creationdate']),\r
+                body = sxpost['body'],\r
+                score = sxpost.get('score', 0),\r
+                author_id = sxpost.get('deletiondate', None) and 1 or uidmap[sxpost.get('owneruserid', 1)]\r
+                )\r
 \r
         post.save()\r
 \r
         create_action = orm.Action(\r
-            action_type = (nodetype == "nodetype") and "ask" or "answer",\r
-            user_id = post.author_id,\r
-            node = post,\r
-            action_date = post.added_at\r
-        )\r
+                action_type = (nodetype == "nodetype") and "ask" or "answer",\r
+                user_id = post.author_id,\r
+                node = post,\r
+                action_date = post.added_at\r
+                )\r
 \r
         create_action.save()\r
 \r
-        #if sxpost.get('deletiondate', None):\r
-        #    delete_action = orm.Action(\r
-        #        action_type = "delete",\r
-        #        user_id = 1,\r
-        #        node = post,\r
-        #        action_date = readTime(sxpost['deletiondate'])\r
-        #    )\r
-\r
-        #    delete_action.save()\r
-        #    post.deleted = delete_action\r
-\r
         if sxpost.get('lasteditoruserid', None):\r
             revise_action = orm.Action(\r
-                action_type = "revise",\r
-                user_id = uidmap[sxpost.get('lasteditoruserid')],\r
-                node = post,\r
-                action_date = readTime(sxpost['lasteditdate']),\r
-            )\r
+                    action_type = "revise",\r
+                    user_id = uidmap[sxpost.get('lasteditoruserid')],\r
+                    node = post,\r
+                    action_date = readTime(sxpost['lasteditdate']),\r
+                    )\r
 \r
             revise_action.save()\r
             post.last_edited = revise_action\r
 \r
         if sxpost.get('communityowneddate', None):\r
-            post.wiki = True\r
-\r
             wikify_action = orm.Action(\r
-                action_type = "wikify",\r
-                user_id = 1,\r
-                node = post,\r
-                action_date = readTime(sxpost['communityowneddate'])\r
-            )\r
+                    action_type = "wikify",\r
+                    user_id = 1,\r
+                    node = post,\r
+                    action_date = readTime(sxpost['communityowneddate'])\r
+                    )\r
 \r
             wikify_action.save()\r
-\r
+            add_post_state("wiki", post, wikify_action)\r
 \r
         if sxpost.get('lastactivityuserid', None):\r
             post.last_activity_by_id = uidmap[sxpost['lastactivityuserid']]\r
             post.last_activity_at = readTime(sxpost['lastactivitydate'])\r
 \r
-            \r
         if sxpost.get('posttypeid') == '1': #question\r
             post.node_type = "question"\r
             post.title = sxpost['title']\r
@@ -326,46 +336,9 @@ def postimport(dump, uidmap, tagmap):
 \r
             post.extra_count = sxpost.get('viewcount', 0)\r
 \r
-            #if sxpost.get('closeddate', None):\r
-            #    post.marked = True\r
-            #\r
-            #    close_action = orm.Action(\r
-            #        action_type = "close",\r
-            #        user_id = 1,\r
-            #        node = post,\r
-            #        action_date = datetime.now() - timedelta(days=7)\r
-            #    )\r
-            #\r
-            #    close_action.save()\r
-            #    post.extra_action = close_action\r
-\r
-            #if sxpost.get('acceptedanswerid', None):\r
-            #    accepted[int(sxpost.get('acceptedanswerid'))] = post\r
-\r
-            #post.save()\r
-\r
         else:\r
             post.parent_id = sxpost['parentid']\r
 \r
-            #if int(post.id) in accepted:\r
-                #post.marked = True\r
-\r
-                #accept_action = orm.Action(\r
-                #    action_type = "acceptanswer",\r
-                #    user_id = accepted[int(post.id)].author_id,\r
-                #    node = post,\r
-                #    action_date = datetime.now() - timedelta(days=7)\r
-                #)\r
-\r
-                #accept_action.save()\r
-\r
-\r
-                #post.accepted_at = datetime.now()\r
-                #post.accepted_by_id = accepted[int(post.id)].author_id\r
-\r
-                #accepted[int(post.id)].extra_ref = post\r
-                #accepted[int(post.id)].save()\r
-\r
         post.save()\r
 \r
         all[int(post.id)] = post\r
@@ -380,20 +353,20 @@ def comment_import(dump, uidmap, posts):
     for sxc in comments:\r
         currid += 1\r
         oc = orm.Node(\r
-            id = currid,\r
-            node_type = "comment",\r
-            added_at = readTime(sxc['creationdate']),\r
-            author_id = uidmap[sxc.get('userid', 1)],\r
-            body = sxc['text'],\r
-            parent_id = sxc.get('postid'),\r
-        )\r
+                id = currid,\r
+                node_type = "comment",\r
+                added_at = readTime(sxc['creationdate']),\r
+                author_id = uidmap[sxc.get('userid', 1)],\r
+                body = sxc['text'],\r
+                parent_id = sxc.get('postid'),\r
+                )\r
 \r
         if sxc.get('deletiondate', None):\r
             delete_action = orm.Action(\r
-                action_type = "delete",\r
-                user_id = uidmap[sxc['deletionuserid']],\r
-                action_date = readTime(sxc['deletiondate'])\r
-            )\r
+                    action_type = "delete",\r
+                    user_id = uidmap[sxc['deletionuserid']],\r
+                    action_date = readTime(sxc['deletiondate'])\r
+                    )\r
 \r
             oc.author_id = uidmap[sxc['deletionuserid']]\r
             oc.save()\r
@@ -401,17 +374,17 @@ def comment_import(dump, uidmap, posts):
             delete_action.node = oc\r
             delete_action.save()\r
 \r
-            oc.deleted = delete_action\r
+            add_post_state("deleted", oc, delete_action)\r
         else:\r
             oc.author_id = uidmap[sxc.get('userid', 1)]\r
             oc.save()\r
 \r
         create_action = orm.Action(\r
-            action_type = "comment",\r
-            user_id = oc.author_id,\r
-            node = oc,\r
-            action_date = oc.added_at\r
-        )\r
+                action_type = "comment",\r
+                user_id = oc.author_id,\r
+                node = oc,\r
+                action_date = oc.added_at\r
+                )\r
 \r
         create_action.save()\r
         oc.save()\r
@@ -434,15 +407,15 @@ def add_tags_to_posts(posts, tagmap):
 \r
 def create_and_activate_revision(post):\r
     rev = orm.NodeRevision(\r
-        author_id = post.author_id,\r
-        body = post.body,\r
-        node_id = post.id,\r
-        revised_at = post.added_at,\r
-        revision = 1,\r
-        summary = 'Initial revision',\r
-        tagnames = post.tagnames,\r
-        title = post.title,\r
-    )\r
+            author_id = post.author_id,\r
+            body = post.body,\r
+            node_id = post.id,\r
+            revised_at = post.added_at,\r
+            revision = 1,\r
+            summary = 'Initial revision',\r
+            tagnames = post.tagnames,\r
+            title = post.title,\r
+            )\r
 \r
     rev.save()\r
     post.active_revision_id = rev.id\r
@@ -456,9 +429,9 @@ def post_vote_import(dump, uidmap, posts):
 \r
     for sxv in votes:\r
         action = orm.Action(\r
-            user_id=uidmap[sxv['userid']],\r
-            action_date = readTime(sxv['creationdate']),\r
-        )\r
+                user_id=uidmap[sxv['userid']],\r
+                action_date = readTime(sxv['creationdate']),\r
+                )\r
 \r
         node = posts.get(int(sxv['postid']), None)\r
         if not node: continue\r
@@ -472,7 +445,6 @@ def post_vote_import(dump, uidmap, posts):
             action.save()\r
 \r
             answer.marked = True\r
-            answer.extra_action = action\r
 \r
             question.extra_ref_id = answer.id\r
 \r
@@ -487,12 +459,12 @@ def post_vote_import(dump, uidmap, posts):
                 action.save()\r
 \r
                 ov = orm.Vote(\r
-                    node_id = action.node.id,\r
-                    user_id = action.user_id,\r
-                    voted_at = action.action_date,\r
-                    value = sxv['votetypeid'] == '2' and 1 or -1,\r
-                    action = action\r
-                )\r
+                        node_id = action.node.id,\r
+                        user_id = action.user_id,\r
+                        voted_at = action.action_date,\r
+                        value = sxv['votetypeid'] == '2' and 1 or -1,\r
+                        action = action\r
+                        )\r
                 ov.save()\r
             else:\r
                 action.action_type = "unknown"\r
@@ -503,12 +475,12 @@ def post_vote_import(dump, uidmap, posts):
             action.save()\r
 \r
             of = orm.Flag(\r
-                node = action.node,\r
-                user_id = action.user_id,\r
-                flagged_at = action.action_date,\r
-                reason = '',\r
-                action = action\r
-            )\r
+                    node = action.node,\r
+                    user_id = action.user_id,\r
+                    flagged_at = action.action_date,\r
+                    reason = '',\r
+                    action = action\r
+                    )\r
 \r
             of.save()\r
 \r
@@ -522,56 +494,55 @@ def post_vote_import(dump, uidmap, posts):
             action.save()\r
 \r
             node.marked = True\r
-            node.extra_action = action\r
             node.save()\r
 \r
         elif sxv['votetypeid'] == '7':\r
             action.action_type = "unknown"\r
             action.save()\r
-            \r
+\r
             node.marked = False\r
-            node.extra_action = None\r
             node.save()\r
 \r
+            remove_post_state("closed", node)\r
+\r
         elif sxv['votetypeid'] == '10':\r
             action.action_type = "delete"\r
             action.save()\r
 \r
-            node.deleted = action\r
-            node.save()\r
-\r
         elif sxv['votetypeid'] == '11':\r
             action.action_type = "unknown"\r
             action.save()\r
 \r
-            node.deleted = None\r
-            node.save()\r
+            remove_post_state("deleted", node)\r
 \r
         else:\r
             action.action_type = "unknown"\r
             action.save()\r
 \r
-\r
         if sxv.get('targetrepchange', None):\r
             rep = orm.ActionRepute(\r
-                action = action,\r
-                date = action.action_date,\r
-                user_id = uidmap[sxv['targetuserid']],\r
-                value = int(sxv['targetrepchange'])\r
-            )\r
+                    action = action,\r
+                    date = action.action_date,\r
+                    user_id = uidmap[sxv['targetuserid']],\r
+                    value = int(sxv['targetrepchange'])\r
+                    )\r
 \r
             rep.save()\r
 \r
         if sxv.get('voterrepchange', None):\r
             rep = orm.ActionRepute(\r
-                action = action,\r
-                date = action.action_date,\r
-                user_id = uidmap[sxv['userid']],\r
-                value = int(sxv['voterrepchange'])\r
-            )\r
+                    action = action,\r
+                    date = action.action_date,\r
+                    user_id = uidmap[sxv['userid']],\r
+                    value = int(sxv['voterrepchange'])\r
+                    )\r
 \r
             rep.save()\r
 \r
+        if action.action_type in ("acceptanswer", "delete", "close"):\r
+            state = {"acceptanswer": "accepted", "delete": "deleted", "close": "closed"}[action.action_type]\r
+            add_post_state(state, node, action)\r
+\r
 \r
 def comment_vote_import(dump, uidmap, comments, posts):\r
     votes = readTable(dump, "Comments2Votes")\r
@@ -586,20 +557,20 @@ def comment_vote_import(dump, uidmap, comments, posts):
                 user2vote.append((comment_id, user_id))\r
 \r
                 action = orm.Action(\r
-                    action_type = "voteupcomment",\r
-                    user_id = user_id,\r
-                    action_date = readTime(sxv['creationdate']),\r
-                    node_id = comment_id\r
-                )\r
+                        action_type = "voteupcomment",\r
+                        user_id = user_id,\r
+                        action_date = readTime(sxv['creationdate']),\r
+                        node_id = comment_id\r
+                        )\r
                 action.save()\r
 \r
                 ov = orm.Vote(\r
-                    node_id = comment_id,\r
-                    user_id = user_id,\r
-                    voted_at = action.action_date,\r
-                    value = 1,\r
-                    action = action\r
-                )\r
+                        node_id = comment_id,\r
+                        user_id = user_id,\r
+                        voted_at = action.action_date,\r
+                        value = 1,\r
+                        action = action\r
+                        )\r
 \r
                 ov.save()\r
 \r
@@ -607,7 +578,6 @@ def comment_vote_import(dump, uidmap, comments, posts):
                 posts[int(action.node_id)].save()\r
 \r
 \r
-\r
 def badges_import(dump, uidmap, post_list):\r
     node_ctype = orm['contenttypes.contenttype'].objects.get(name='node')\r
     obadges = dict([(b.cls, b) for b in orm.Badge.objects.all()])\r
@@ -623,10 +593,10 @@ def badges_import(dump, uidmap, post_list):
             sx_to_osqa[id] = obadges[cls]\r
         else:\r
             osqab = orm.Badge(\r
-                cls = cls,\r
-                awarded_count = 0,\r
-                type = sxb['class']                \r
-            )\r
+                    cls = cls,\r
+                    awarded_count = 0,\r
+                    type = sxb['class']\r
+                    )\r
             osqab.save()\r
             sx_to_osqa[id] = osqab\r
 \r
@@ -641,20 +611,20 @@ def badges_import(dump, uidmap, post_list):
             user_badge_count[user_id] = 0\r
 \r
         action = orm.Action(\r
-            action_type = "award",\r
-            user_id = user_id,\r
-            action_date = readTime(sxa['date'])\r
-        )\r
+                action_type = "award",\r
+                user_id = user_id,\r
+                action_date = readTime(sxa['date'])\r
+                )\r
 \r
         action.save()\r
 \r
         osqaa = orm.Award(\r
-            user_id = uidmap[sxa['userid']],\r
-            badge = badge,\r
-            node = post_list[user_badge_count[user_id]],\r
-            awarded_at = action.action_date,\r
-            action = action\r
-        )\r
+                user_id = uidmap[sxa['userid']],\r
+                badge = badge,\r
+                node = post_list[user_badge_count[user_id]],\r
+                awarded_at = action.action_date,\r
+                action = action\r
+                )\r
 \r
         osqaa.save()\r
         badge.awarded_count += 1\r
@@ -686,8 +656,7 @@ def sximport(dump, options):
 \r
     reset_sequences()\r
 \r
-    \r
-    \r
+\r
 PG_SEQUENCE_RESETS = """\r
 SELECT setval('"auth_user_id_seq"', coalesce(max("id"), 1) + 2, max("id") IS NOT null) FROM "auth_user";\r
 SELECT setval('"auth_user_groups_id_seq"', coalesce(max("id"), 1) + 2, max("id") IS NOT null) FROM "auth_user_groups";\r
@@ -701,6 +670,7 @@ SELECT setval('"forum_authkeyuserassociation_id_seq"', coalesce(max("id"), 1) +
 SELECT setval('"forum_tag_id_seq"', coalesce(max("id"), 1) + 2, max("id") IS NOT null) FROM "forum_tag";\r
 SELECT setval('"forum_markedtag_id_seq"', coalesce(max("id"), 1) + 2, max("id") IS NOT null) FROM "forum_markedtag";\r
 SELECT setval('"forum_node_id_seq"', coalesce(max("id"), 1) + 2, max("id") IS NOT null) FROM "forum_node";\r
+SELECT setval('"forum_nodestate_id_seq"', coalesce(max("id"), 1) + 2, max("id") IS NOT null) FROM "forum_nodestate";\r
 SELECT setval('"forum_node_tags_id_seq"', coalesce(max("id"), 1) + 2, max("id") IS NOT null) FROM "forum_node_tags";\r
 SELECT setval('"forum_noderevision_id_seq"', coalesce(max("id"), 1) + 2, max("id") IS NOT null) FROM "forum_noderevision";\r
 SELECT setval('"forum_node_tags_id_seq"', coalesce(max("id"), 1) + 2, max("id") IS NOT null) FROM "forum_node_tags";\r
index 39439bc0a361f952696090eed92d480551210179..c691f52221326baf38b72b8118047f96339bd17f 100644 (file)
@@ -2,9 +2,7 @@ from south.v2 import DataMigration
 from south.orm import FakeORM\r
 \r
 class Migration(DataMigration):\r
-\r
     def forwards(self, orm):\r
-\r
         pass\r
 \r
 \r
@@ -12,243 +10,285 @@ class Migration(DataMigration):
         "Write your backwards methods here."\r
 \r
     models = {\r
-        'auth.group': {\r
-            'Meta': {'object_name': 'Group'},\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),\r
-            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})\r
-        },\r
-        'auth.permission': {\r
-            'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},\r
-            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),\r
-            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})\r
-        },\r
-        'auth.user': {\r
-            'Meta': {'object_name': 'User'},\r
-            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\r
-            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),\r
-            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),\r
-            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),\r
-            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
-            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
-            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\r
-            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),\r
-            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),\r
-            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),\r
-            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})\r
-        },\r
-        'contenttypes.contenttype': {\r
-            'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},\r
-            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),\r
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})\r
-        },\r
-        'forum.action': {\r
-            'Meta': {'object_name': 'Action'},\r
-            'action_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\r
-            'action_type': ('django.db.models.fields.CharField', [], {'max_length': '16'}),\r
-            'canceled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
-            'canceled_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),\r
-            'canceled_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'canceled_actions'", 'null': 'True', 'to': "orm['forum.User']"}),\r
-            'canceled_ip': ('django.db.models.fields.CharField', [], {'max_length': '16'}),\r
-            'extra': ('forum.models.utils.PickledObjectField', [], {'null': 'True'}),\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'ip': ('django.db.models.fields.CharField', [], {'max_length': '16'}),\r
-            'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'actions'", 'null': 'True', 'to': "orm['forum.Node']"}),\r
-            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'actions'", 'to': "orm['forum.User']"})\r
-        },\r
-        'forum.actionrepute': {\r
-            'Meta': {'object_name': 'ActionRepute'},\r
-            'action': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'reputes'", 'to': "orm['forum.Action']"}),\r
-            'by_canceled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
-            'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'reputes'", 'to': "orm['forum.User']"}),\r
-            'value': ('django.db.models.fields.IntegerField', [], {'default': '0'})\r
-        },\r
-        'forum.authkeyuserassociation': {\r
-            'Meta': {'object_name': 'AuthKeyUserAssociation'},\r
-            'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),\r
-            'provider': ('django.db.models.fields.CharField', [], {'max_length': '64'}),\r
-            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'auth_keys'", 'to': "orm['forum.User']"})\r
-        },\r
-        'forum.award': {\r
-            'Meta': {'unique_together': "(('user', 'badge', 'node'),)", 'object_name': 'Award'},\r
-            'action': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'award'", 'unique': 'True', 'to': "orm['forum.Action']"}),\r
-            'awarded_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\r
-            'badge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'awards'", 'to': "orm['forum.Badge']"}),\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'node': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.Node']", 'null': 'True'}),\r
-            'trigger': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'awards'", 'null': 'True', 'to': "orm['forum.Action']"}),\r
-            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.User']"})\r
-        },\r
-        'forum.badge': {\r
-            'Meta': {'object_name': 'Badge'},\r
-            'awarded_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),\r
-            'awarded_to': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'badges'", 'symmetrical': 'False', 'through': "orm['forum.Award']", 'to': "orm['forum.User']"}),\r
-            'cls': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True'}),\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'type': ('django.db.models.fields.SmallIntegerField', [], {})\r
-        },\r
-        'forum.flag': {\r
-            'Meta': {'unique_together': "(('user', 'node'),)", 'object_name': 'Flag'},\r
-            'action': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'flag'", 'unique': 'True', 'to': "orm['forum.Action']"}),\r
-            'flagged_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'flags'", 'to': "orm['forum.Node']"}),\r
-            'reason': ('django.db.models.fields.CharField', [], {'max_length': '300'}),\r
-            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'flags'", 'to': "orm['forum.User']"})\r
-        },\r
-        'forum.keyvalue': {\r
-            'Meta': {'object_name': 'KeyValue'},\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),\r
-            'value': ('forum.models.utils.PickledObjectField', [], {'null': 'True'})\r
-        },\r
-        'forum.markedtag': {\r
-            'Meta': {'object_name': 'MarkedTag'},\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'reason': ('django.db.models.fields.CharField', [], {'max_length': '16'}),\r
-            'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'user_selections'", 'to': "orm['forum.Tag']"}),\r
-            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tag_selections'", 'to': "orm['forum.User']"})\r
-        },\r
-        'forum.node': {\r
-            'Meta': {'object_name': 'Node'},\r
-            'abs_parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'all_children'", 'null': 'True', 'to': "orm['forum.Node']"}),\r
-            'active_revision': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'active'", 'unique': 'True', 'null': 'True', 'to': "orm['forum.NodeRevision']"}),\r
-            'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\r
-            'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'nodes'", 'to': "orm['forum.User']"}),\r
-            'body': ('django.db.models.fields.TextField', [], {}),\r
-            'extra_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),\r
-            'extra_ref': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.Node']", 'null': 'True'}),\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'last_activity_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),\r
-            'last_activity_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.User']", 'null': 'True'}),\r
-            'last_edited': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'edited_node'", 'unique': 'True', 'null': 'True', 'to': "orm['forum.Action']"}),\r
-            'marked': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
-            'node_type': ('django.db.models.fields.CharField', [], {'default': "'node'", 'max_length': '16'}),\r
-            'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'children'", 'null': 'True', 'to': "orm['forum.Node']"}),\r
-            'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}),\r
-            'state_string': ('django.db.models.fields.TextField', [], {'default': "''"}),\r
-            'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}),\r
-            'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'nodes'", 'symmetrical': 'False', 'to': "orm['forum.Tag']"}),\r
-            'title': ('django.db.models.fields.CharField', [], {'max_length': '300'})\r
-        },\r
-        'forum.noderevision': {\r
-            'Meta': {'unique_together': "(('node', 'revision'),)", 'object_name': 'NodeRevision'},\r
-            'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'noderevisions'", 'to': "orm['forum.User']"}),\r
-            'body': ('django.db.models.fields.TextField', [], {}),\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['forum.Node']"}),\r
-            'revised_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\r
-            'revision': ('django.db.models.fields.PositiveIntegerField', [], {}),\r
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '300'}),\r
-            'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}),\r
-            'title': ('django.db.models.fields.CharField', [], {'max_length': '300'})\r
-        },\r
-        'forum.nodestate': {\r
-            'Meta': {'unique_together': "(('node', 'state_type'),)", 'object_name': 'NodeState'},\r
-            'action': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'node_state'", 'unique': 'True', 'to': "orm['forum.Action']"}),\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'states'", 'to': "orm['forum.Node']"}),\r
-            'state_type': ('django.db.models.fields.CharField', [], {'max_length': '16'})\r
-        },\r
-        'forum.openidassociation': {\r
-            'Meta': {'object_name': 'OpenIdAssociation'},\r
-            'assoc_type': ('django.db.models.fields.TextField', [], {'max_length': '64'}),\r
-            'handle': ('django.db.models.fields.CharField', [], {'max_length': '255'}),\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'issued': ('django.db.models.fields.IntegerField', [], {}),\r
-            'lifetime': ('django.db.models.fields.IntegerField', [], {}),\r
-            'secret': ('django.db.models.fields.TextField', [], {'max_length': '255'}),\r
-            'server_url': ('django.db.models.fields.TextField', [], {'max_length': '2047'})\r
-        },\r
-        'forum.openidnonce': {\r
-            'Meta': {'object_name': 'OpenIdNonce'},\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'salt': ('django.db.models.fields.CharField', [], {'max_length': '50'}),\r
-            'server_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),\r
-            'timestamp': ('django.db.models.fields.IntegerField', [], {})\r
-        },\r
-        'forum.questionsubscription': {\r
-            'Meta': {'object_name': 'QuestionSubscription'},\r
-            'auto_subscription': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'last_view': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2010, 5, 25, 0, 18, 31, 631000)'}),\r
-            'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.Node']"}),\r
-            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.User']"})\r
-        },\r
-        'forum.subscriptionsettings': {\r
-            'Meta': {'object_name': 'SubscriptionSettings'},\r
-            'all_questions': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
-            'all_questions_watched_tags': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
-            'enable_notifications': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'member_joins': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}),\r
-            'new_question': ('django.db.models.fields.CharField', [], {'default': "'d'", 'max_length': '1'}),\r
-            'new_question_watched_tags': ('django.db.models.fields.CharField', [], {'default': "'i'", 'max_length': '1'}),\r
-            'notify_accepted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
-            'notify_answers': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),\r
-            'notify_comments': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
-            'notify_comments_own_post': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),\r
-            'notify_reply_to_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),\r
-            'questions_answered': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),\r
-            'questions_asked': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),\r
-            'questions_commented': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
-            'questions_viewed': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
-            'subscribed_questions': ('django.db.models.fields.CharField', [], {'default': "'i'", 'max_length': '1'}),\r
-            'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'subscription_settings'", 'unique': 'True', 'to': "orm['forum.User']"})\r
-        },\r
-        'forum.tag': {\r
-            'Meta': {'object_name': 'Tag'},\r
-            'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_tags'", 'to': "orm['forum.User']"}),\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'marked_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'marked_tags'", 'symmetrical': 'False', 'through': "orm['forum.MarkedTag']", 'to': "orm['forum.User']"}),\r
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),\r
-            'used_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'})\r
-        },\r
-        'forum.user': {\r
-            'Meta': {'object_name': 'User', '_ormbases': ['auth.User']},\r
-            'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}),\r
-            'bronze': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),\r
-            'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),\r
-            'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
-            'gold': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),\r
-            'is_approved': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
-            'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\r
-            'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),\r
-            'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),\r
-            'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),\r
-            'silver': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),\r
-            'subscriptions': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'subscribers'", 'symmetrical': 'False', 'through': "orm['forum.QuestionSubscription']", 'to': "orm['forum.Node']"}),\r
-            'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),\r
-            'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'})\r
-        },\r
-        'forum.validationhash': {\r
-            'Meta': {'unique_together': "(('user', 'type'),)", 'object_name': 'ValidationHash'},\r
-            'expiration': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2010, 5, 26, 0, 18, 31, 914000)'}),\r
-            'hash_code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'seed': ('django.db.models.fields.CharField', [], {'max_length': '12'}),\r
-            'type': ('django.db.models.fields.CharField', [], {'max_length': '12'}),\r
-            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.User']"})\r
-        },\r
-        'forum.vote': {\r
-            'Meta': {'unique_together': "(('user', 'node'),)", 'object_name': 'Vote'},\r
-            'action': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'vote'", 'unique': 'True', 'to': "orm['forum.Action']"}),\r
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
-            'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'votes'", 'to': "orm['forum.Node']"}),\r
-            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'votes'", 'to': "orm['forum.User']"}),\r
-            'value': ('django.db.models.fields.SmallIntegerField', [], {}),\r
-            'voted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'})\r
-        }\r
+    'auth.group': {\r
+    'Meta': {'object_name': 'Group'},\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),\r
+    'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']",\r
+                                                                            'symmetrical': 'False', 'blank': 'True'})\r
+    },\r
+    'auth.permission': {\r
+    'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},\r
+    'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),\r
+    'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})\r
+    },\r
+    'auth.user': {\r
+    'Meta': {'object_name': 'User'},\r
+    'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\r
+    'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),\r
+    'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),\r
+    'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False'\r
+                                                                       , 'blank': 'True'}),\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),\r
+    'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
+    'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
+    'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\r
+    'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),\r
+    'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),\r
+    'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']",\r
+                                                                                 'symmetrical': 'False', 'blank': 'True'\r
+                                                                                 }),\r
+    'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})\r
+    },\r
+    'contenttypes.contenttype': {\r
+    'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType',\r
+             'db_table': "'django_content_type'"},\r
+    'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),\r
+    'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})\r
+    },\r
+    'forum.action': {\r
+    'Meta': {'object_name': 'Action'},\r
+    'action_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\r
+    'action_type': ('django.db.models.fields.CharField', [], {'max_length': '16'}),\r
+    'canceled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
+    'canceled_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),\r
+    'canceled_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'canceled_actions'",\r
+                                                                       'null': 'True', 'to': "orm['forum.User']"}),\r
+    'canceled_ip': ('django.db.models.fields.CharField', [], {'max_length': '16'}),\r
+    'extra': ('forum.models.utils.PickledObjectField', [], {'null': 'True'}),\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'ip': ('django.db.models.fields.CharField', [], {'max_length': '16'}),\r
+    'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'actions'", 'null': 'True',\r
+                                                                'to': "orm['forum.Node']"}),\r
+    'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'actions'", 'to': "orm['forum.User']"})\r
+    },\r
+    'forum.actionrepute': {\r
+    'Meta': {'object_name': 'ActionRepute'},\r
+    'action': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'reputes'",\r
+                                                                  'to': "orm['forum.Action']"}),\r
+    'by_canceled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
+    'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'reputes'", 'to': "orm['forum.User']"})\r
+    ,\r
+    'value': ('django.db.models.fields.IntegerField', [], {'default': '0'})\r
+    },\r
+    'forum.authkeyuserassociation': {\r
+    'Meta': {'object_name': 'AuthKeyUserAssociation'},\r
+    'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),\r
+    'provider': ('django.db.models.fields.CharField', [], {'max_length': '64'}),\r
+    'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'auth_keys'", 'to': "orm['forum.User']"\r
+                                                                })\r
+    },\r
+    'forum.award': {\r
+    'Meta': {'unique_together': "(('user', 'badge', 'node'),)", 'object_name': 'Award'},\r
+    'action': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'award'", 'unique': 'True',\r
+                                                                     'to': "orm['forum.Action']"}),\r
+    'awarded_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\r
+    'badge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'awards'", 'to': "orm['forum.Badge']"\r
+                                                                 }),\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'node': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.Node']", 'null': 'True'}),\r
+    'trigger': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'awards'", 'null': 'True',\r
+                                                                   'to': "orm['forum.Action']"}),\r
+    'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.User']"})\r
+    },\r
+    'forum.badge': {\r
+    'Meta': {'object_name': 'Badge'},\r
+    'awarded_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),\r
+    'awarded_to': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'badges'",\r
+                                                                           'symmetrical': 'False',\r
+                                                                           'through': "orm['forum.Award']",\r
+                                                                           'to': "orm['forum.User']"}),\r
+    'cls': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True'}),\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'type': ('django.db.models.fields.SmallIntegerField', [], {})\r
+    },\r
+    'forum.flag': {\r
+    'Meta': {'unique_together': "(('user', 'node'),)", 'object_name': 'Flag'},\r
+    'action': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'flag'", 'unique': 'True',\r
+                                                                     'to': "orm['forum.Action']"}),\r
+    'flagged_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'flags'", 'to': "orm['forum.Node']"}),\r
+    'reason': ('django.db.models.fields.CharField', [], {'max_length': '300'}),\r
+    'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'flags'", 'to': "orm['forum.User']"})\r
+    },\r
+    'forum.keyvalue': {\r
+    'Meta': {'object_name': 'KeyValue'},\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),\r
+    'value': ('forum.models.utils.PickledObjectField', [], {'null': 'True'})\r
+    },\r
+    'forum.markedtag': {\r
+    'Meta': {'object_name': 'MarkedTag'},\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'reason': ('django.db.models.fields.CharField', [], {'max_length': '16'}),\r
+    'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'user_selections'",\r
+                                                               'to': "orm['forum.Tag']"}),\r
+    'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tag_selections'",\r
+                                                                'to': "orm['forum.User']"})\r
+    },\r
+    'forum.node': {\r
+    'Meta': {'object_name': 'Node'},\r
+    'abs_parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'all_children'", 'null': 'True',\r
+                                                                      'to': "orm['forum.Node']"}),\r
+    'active_revision': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'active'",\r
+                                                                              'unique': 'True', 'null': 'True',\r
+                                                                              'to': "orm['forum.NodeRevision']"}),\r
+    'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\r
+    'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'nodes'", 'to': "orm['forum.User']"})\r
+    ,\r
+    'body': ('django.db.models.fields.TextField', [], {}),\r
+    'extra': ('forum.models.utils.PickledObjectField', [], {'null': 'True'}),\r
+    'extra_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),\r
+    'extra_ref': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.Node']", 'null': 'True'}),\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'last_activity_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),\r
+    'last_activity_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.User']", 'null': 'True'}),\r
+    'last_edited': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'edited_node'", 'unique': 'True'\r
+                                                                       , 'null': 'True', 'to': "orm['forum.Action']"}),\r
+    'marked': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
+    'node_type': ('django.db.models.fields.CharField', [], {'default': "'node'", 'max_length': '16'}),\r
+    'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'children'", 'null': 'True',\r
+                                                                  'to': "orm['forum.Node']"}),\r
+    'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}),\r
+    'state_string': ('django.db.models.fields.TextField', [], {'default': "''"}),\r
+    'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}),\r
+    'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'nodes'", 'symmetrical': 'False',\r
+                                                                     'to': "orm['forum.Tag']"}),\r
+    'title': ('django.db.models.fields.CharField', [], {'max_length': '300'})\r
+    },\r
+    'forum.noderevision': {\r
+    'Meta': {'unique_together': "(('node', 'revision'),)", 'object_name': 'NodeRevision'},\r
+    'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'noderevisions'",\r
+                                                                  'to': "orm['forum.User']"}),\r
+    'body': ('django.db.models.fields.TextField', [], {}),\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['forum.Node']"\r
+                                                                }),\r
+    'revised_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\r
+    'revision': ('django.db.models.fields.PositiveIntegerField', [], {}),\r
+    'summary': ('django.db.models.fields.CharField', [], {'max_length': '300'}),\r
+    'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}),\r
+    'title': ('django.db.models.fields.CharField', [], {'max_length': '300'})\r
+    },\r
+    'forum.nodestate': {\r
+    'Meta': {'unique_together': "(('node', 'state_type'),)", 'object_name': 'NodeState'},\r
+    'action': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'node_state'", 'unique': 'True',\r
+                                                                     'to': "orm['forum.Action']"}),\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'states'", 'to': "orm['forum.Node']"}),\r
+    'state_type': ('django.db.models.fields.CharField', [], {'max_length': '16'})\r
+    },\r
+    'forum.openidassociation': {\r
+    'Meta': {'object_name': 'OpenIdAssociation'},\r
+    'assoc_type': ('django.db.models.fields.TextField', [], {'max_length': '64'}),\r
+    'handle': ('django.db.models.fields.CharField', [], {'max_length': '255'}),\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'issued': ('django.db.models.fields.IntegerField', [], {}),\r
+    'lifetime': ('django.db.models.fields.IntegerField', [], {}),\r
+    'secret': ('django.db.models.fields.TextField', [], {'max_length': '255'}),\r
+    'server_url': ('django.db.models.fields.TextField', [], {'max_length': '2047'})\r
+    },\r
+    'forum.openidnonce': {\r
+    'Meta': {'object_name': 'OpenIdNonce'},\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'salt': ('django.db.models.fields.CharField', [], {'max_length': '50'}),\r
+    'server_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),\r
+    'timestamp': ('django.db.models.fields.IntegerField', [], {})\r
+    },\r
+    'forum.questionsubscription': {\r
+    'Meta': {'object_name': 'QuestionSubscription'},\r
+    'auto_subscription': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'last_view': ('django.db.models.fields.DateTimeField', [], {\r
+    'default': 'datetime.datetime(2010, 6, 4, 12, 12, 32, 595305)'}),\r
+    'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.Node']"}),\r
+    'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.User']"})\r
+    },\r
+    'forum.subscriptionsettings': {\r
+    'Meta': {'object_name': 'SubscriptionSettings'},\r
+    'all_questions': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
+    'all_questions_watched_tags': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
+    'enable_notifications': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'member_joins': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}),\r
+    'new_question': ('django.db.models.fields.CharField', [], {'default': "'d'", 'max_length': '1'}),\r
+    'new_question_watched_tags': ('django.db.models.fields.CharField', [], {'default': "'i'", 'max_length': '1'}),\r
+    'notify_accepted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
+    'notify_answers': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),\r
+    'notify_comments': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
+    'notify_comments_own_post': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),\r
+    'notify_reply_to_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),\r
+    'questions_answered': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),\r
+    'questions_asked': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),\r
+    'questions_commented': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
+    'questions_viewed': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
+    'subscribed_questions': ('django.db.models.fields.CharField', [], {'default': "'i'", 'max_length': '1'}),\r
+    'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'subscription_settings'",\r
+                                                                   'unique': 'True', 'to': "orm['forum.User']"})\r
+    },\r
+    'forum.tag': {\r
+    'Meta': {'object_name': 'Tag'},\r
+    'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_tags'",\r
+                                                                      'to': "orm['forum.User']"}),\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'marked_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'marked_tags'",\r
+                                                                          'symmetrical': 'False',\r
+                                                                          'through': "orm['forum.MarkedTag']",\r
+                                                                          'to': "orm['forum.User']"}),\r
+    'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),\r
+    'used_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'})\r
+    },\r
+    'forum.user': {\r
+    'Meta': {'object_name': 'User', '_ormbases': ['auth.User']},\r
+    'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}),\r
+    'bronze': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),\r
+    'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),\r
+    'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
+    'gold': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),\r
+    'is_approved': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),\r
+    'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),\r
+    'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),\r
+    'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),\r
+    'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),\r
+    'silver': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),\r
+    'subscriptions': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'subscribers'",\r
+                                                                              'symmetrical': 'False',\r
+                                                                              'through': "orm['forum.QuestionSubscription']"\r
+                                                                              , 'to': "orm['forum.Node']"}),\r
+    'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True',\r
+                                                                       'primary_key': 'True'}),\r
+    'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'})\r
+    },\r
+    'forum.validationhash': {\r
+    'Meta': {'unique_together': "(('user', 'type'),)", 'object_name': 'ValidationHash'},\r
+    'expiration': ('django.db.models.fields.DateTimeField', [], {\r
+    'default': 'datetime.datetime(2010, 6, 5, 12, 12, 32, 734979)'}),\r
+    'hash_code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'seed': ('django.db.models.fields.CharField', [], {'max_length': '12'}),\r
+    'type': ('django.db.models.fields.CharField', [], {'max_length': '12'}),\r
+    'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['forum.User']"})\r
+    },\r
+    'forum.vote': {\r
+    'Meta': {'unique_together': "(('user', 'node'),)", 'object_name': 'Vote'},\r
+    'action': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'vote'", 'unique': 'True',\r
+                                                                     'to': "orm['forum.Action']"}),\r
+    'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),\r
+    'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'votes'", 'to': "orm['forum.Node']"}),\r
+    'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'votes'", 'to': "orm['forum.User']"}),\r
+    'value': ('django.db.models.fields.SmallIntegerField', [], {}),\r
+    'voted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'})\r
+    }\r
     }\r
 \r
     complete_apps = ['forum']\r