tangentlabs/django-oscar — pull request #434 by elbaschid (2012-12-24 00:22:43+00:00)
Title: Add slug field to partner model

This addresses issue #354 suggesting a ``display_name`` field. To remain consistent with other models in Oscar, I changed the partner model to use a ``slug`` and ``name`` field. The data in ``name`` is moved into the ``slug`` field by a datamigration.

I also introduced a new property ``display_name`` that returns the ``name`` field if not empty and the ``slug`` otherwise.

I am aware that this might cause issues with existing setups of Oscar where the partner name used in the ``OSCAR_PARTNER_WRAPPERS`` settings and is different from its slugified version. I think it should be enough to document this so that it can be changed in the settings. Having ``name`` and ``display_name`` seemed more confusing than introducing this change that's the reason why I went with this way of implementing a solution.

Please let me know what you think and if I should change anything.