/usr/lib/python2.7/dist-packages/south/v2.py is in python-django-south 0.7.5-1.1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | """
API versioning file; we can tell what kind of migrations things are
by what class they inherit from (if none, it's a v1).
"""
from south.utils import ask_for_it_by_name
class BaseMigration(object):
def gf(self, field_name):
"Gets a field by absolute reference."
field = ask_for_it_by_name(field_name)
field.model = FakeModel
return field
class SchemaMigration(BaseMigration):
pass
class DataMigration(BaseMigration):
# Data migrations shouldn't be dry-run
no_dry_run = True
class FakeModel(object):
"Fake model so error messages on fields don't explode"
pass
|