jamesturk/django-markupfield — pull request #26 by 7mp (2014-07-30 16:24:22+00:00)
Title: Fix the migration problem of #20 (fields added twice)

Check on `contribute_to_class` whether we're running migrations.

Completes the work started in 49dee69ed673a4c2c28a0a9d8fdbe2e9a40faca2 which was based on https://bitbucket.org/carljm/django-markitup/src/652ce9bbcea8/markitup/fields.py#cl-120 but which lacked the condition to `contribute_to_class`.

TODO: Due to backwards incompatibility didn't rename the South introspection `rendered_field` -attribute even though it is used slightly unintuitively:

- outside South it's value is `True` (meaning that the rendered field should be created)
- when running South the introspection adds this `rendered_field=True` to keyword arguments, ultimately resulting in `some_markup_field.rendered_field` being `False`

(The original solution used `add_rendered_field` as the field attribute and `no_rendered_field` as the introspection attribute.)