Some basic stuff w migrate

master
Nick Sergeant 2012-04-08 19:19:52 -04:00
parent b594a8f12d
commit a0ae95da64
2 changed files with 2 additions and 5 deletions

View File

@ -7,8 +7,7 @@ import MySQLdb
from django.contrib.auth.models import User from django.contrib.auth.models import User
from snipts.models import Favorite, Snipt from snipts.models import Favorite, Snipt
from taggit.models import Tag, TaggedItem from taggit.models import Tag
from taggit.utils import parse_tags
from tastypie.models import ApiKey from tastypie.models import ApiKey
conn = MySQLdb.connect(host='localhost', user='root', passwd='', db='sniptold') conn = MySQLdb.connect(host='localhost', user='root', passwd='', db='sniptold')
@ -145,7 +144,7 @@ def favs():
created=created, created=created,
modified=created, modified=created,
) )
print 'Saving favorite ' + fav.id print 'Saving favorite ' + str(fav.id)
fav.save() fav.save()
print 'Done with favorites' print 'Done with favorites'

View File

@ -35,7 +35,6 @@ class Snipt(models.Model):
key = models.CharField(max_length=100, blank=True, null=True) key = models.CharField(max_length=100, blank=True, null=True)
public = models.BooleanField(default=False) public = models.BooleanField(default=False)
# TODO: Change back auto
created = models.DateTimeField(auto_now_add=True, editable=False) created = models.DateTimeField(auto_now_add=True, editable=False)
modified = models.DateTimeField(auto_now=True, editable=False) modified = models.DateTimeField(auto_now=True, editable=False)
@ -117,7 +116,6 @@ class Favorite(models.Model):
snipt = models.ForeignKey(Snipt) snipt = models.ForeignKey(Snipt)
user = models.ForeignKey(User) user = models.ForeignKey(User)
# TODO: Change back auto
created = models.DateTimeField(auto_now_add=True, editable=False) created = models.DateTimeField(auto_now_add=True, editable=False)
modified = models.DateTimeField(auto_now=True, editable=False) modified = models.DateTimeField(auto_now=True, editable=False)