# HG changeset patch # User durandn # Date 1430228946 -7200 # Node ID 2c995c53bd884b119a6ecede02fa5063b0f5ec77 # Parent 5b04f2cb52834c4451f756a242be61e47f5ce1dc Django 1.8 upgrade: adding app_label to models Meta + Using string instead of classes in ForeignKey fields diff -r 5b04f2cb5283 -r 2c995c53bd88 src/hashcut/models.py --- a/src/hashcut/models.py Tue Apr 28 12:58:50 2015 +0200 +++ b/src/hashcut/models.py Tue Apr 28 15:49:06 2015 +0200 @@ -1,7 +1,6 @@ from django.contrib.auth.models import Group from django.db import models from django.db.models import Model -from ldt.ldt_utils.models import Project class Branding(Model): @@ -12,11 +11,14 @@ def __unicode__(self): return unicode(self.id) + u"::" + unicode(self.name) + class Meta: + app_label = "hashcut" + class Mashup(Model): - project = models.ForeignKey(Project, null=True) - branding = models.ForeignKey(Branding) + project = models.ForeignKey("ldt_utils.Project", null=True) + branding = models.ForeignKey("Branding") def __unicode__(self): return unicode(self.id) + u"::" + unicode(self.branding.name) + u"::" + unicode(self.project.owner) + u"::" + unicode(self.project.ldt_id) @@ -30,4 +32,6 @@ return locals() creator = property(**creator()) - \ No newline at end of file + + class Meta: + app_label = "hashcut" \ No newline at end of file