title: How to call a static methods on a django model class during a south migration
body: <p>I'm writing a data migration in south to fix some denormalized data I screwed up in earlier code.  The way to figure out the right value for the incorrect field is to call a static method on the django model class.  The code looks like this:</p>
  
  <pre><code>class Account(models.Model):
      name = models.CharField()
  
      @staticmethod
      def lookup_by_name(name):
          # There's actually more to it than this
          return Account.objects.get(name=name)
  
  class Record(models.Model):
      account_name = models.CharField()
      acct = models.ForeignKey('Account')
  </code></pre>
  
  <p>...</p>
  
  <pre><code>class Migration(DataMigration):
  
      def forwards(self, orm):
          # Fixing Records with the wrong FK to Account
          for record in orm.Record.objects.all():
              record.acct = orm.Account.lookup_by_name(record.account_name)
              record.save()
  </code></pre>
  
  <p>But this fails with</p>
  
  <p><code>AttributeError: type object 'Account' has no attribute 'lookup_by_name'</code></p>
  
  <p>I'm guessing south just doesn't support <code>@staticmethod</code>s on model classes?</p>
  
  <p>Trying to import Account directly fails, unless I also import Record directly and completely ignore the ORM object.  Is that a safe option, since it's a data migration and the schema isn't changing?  Or should I just run this fix by hand rather than in the context of a south migration.</p>