From a0ae95da644bdb8b419c81e9d9c9b2d069fa252f Mon Sep 17 00:00:00 2001 From: Nick Sergeant Date: Sun, 8 Apr 2012 19:19:52 -0400 Subject: [PATCH] Some basic stuff w migrate --- migrate.py | 5 ++--- snipts/models.py | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/migrate.py b/migrate.py index 2af60d2..62d2999 100644 --- a/migrate.py +++ b/migrate.py @@ -7,8 +7,7 @@ import MySQLdb from django.contrib.auth.models import User from snipts.models import Favorite, Snipt -from taggit.models import Tag, TaggedItem -from taggit.utils import parse_tags +from taggit.models import Tag from tastypie.models import ApiKey conn = MySQLdb.connect(host='localhost', user='root', passwd='', db='sniptold') @@ -145,7 +144,7 @@ def favs(): created=created, modified=created, ) - print 'Saving favorite ' + fav.id + print 'Saving favorite ' + str(fav.id) fav.save() print 'Done with favorites' diff --git a/snipts/models.py b/snipts/models.py index f04b17f..0c8b53c 100644 --- a/snipts/models.py +++ b/snipts/models.py @@ -35,7 +35,6 @@ class Snipt(models.Model): key = models.CharField(max_length=100, blank=True, null=True) public = models.BooleanField(default=False) - # TODO: Change back auto created = models.DateTimeField(auto_now_add=True, editable=False) modified = models.DateTimeField(auto_now=True, editable=False) @@ -117,7 +116,6 @@ class Favorite(models.Model): snipt = models.ForeignKey(Snipt) user = models.ForeignKey(User) - # TODO: Change back auto created = models.DateTimeField(auto_now_add=True, editable=False) modified = models.DateTimeField(auto_now=True, editable=False)