Some basic stuff w migrate
parent
b594a8f12d
commit
a0ae95da64
|
@ -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'
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue