Skip to content

Commit

Permalink
cleanup: Remove old south mentions
Browse files Browse the repository at this point in the history
  • Loading branch information
last-partizan committed May 15, 2022
1 parent 15641b6 commit 5869169
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 23 deletions.
7 changes: 3 additions & 4 deletions docs/modeltranslation/registration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,12 @@ fields) and apply it. If not, you can use a little helper:
:ref:`commands-sync_translation_fields` which can execute schema-ALTERing SQL
to add new fields. Use either of these two solutions, not both.

If you are adding translation fields to a third-party app that is using South,
If you are adding translation fields to a third-party app,
things get more complicated. In order to be able to update the app in the future,
and to feel comfortable, you should use the ``sync_translation_fields`` command.
Although it's possible to introduce new fields in a migration, it's nasty and
involves copying migration files, using ``SOUTH_MIGRATION_MODULES`` setting,
and passing ``--delete-ghost-migrations`` flag, so we don't recommend it.
Invoking ``sync_translation_fields`` is plain easier.
involves copying migration files, using ``MIGRATION_MODULES`` setting,
so we don't recommend it. Invoking ``sync_translation_fields`` is plain easier.

Note that all added fields are by default declared ``blank=True`` and
``null=True`` no matter if the original field is required or not. In other
Expand Down
19 changes: 0 additions & 19 deletions modeltranslation/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,25 +289,6 @@ def clone(self):
cls = import_string(path)
return cls(*args, **kwargs)

def south_field_triple(self):
"""
Returns a suitable description of this field for South.
"""
# We'll just introspect the _actual_ field.
from south.modelsinspector import introspector

try:
# Check if the field provides its own 'field_class':
field_class = self.translated_field.south_field_triple()[0]
except AttributeError:
field_class = '%s.%s' % (
self.translated_field.__class__.__module__,
self.translated_field.__class__.__name__,
)
args, kwargs = introspector(self)
# That's our definition!
return (field_class, args, kwargs)


class TranslationFieldDescriptor(object):
"""
Expand Down

0 comments on commit 5869169

Please sign in to comment.