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