justquick/django-activity-stream — pull request #105 by maraujop (2012-08-06 14:33:13+00:00)
Title: Making the output of a Model custom flexible

It would be nice that the models had a special method, that if defined was called for the string representation. This gives a nice extra abstraction layer if needed.

Usually `__unicode__` is defined in a verbose way for debugging purposes. Other times you may point to a model that has many fields represented in this method, but for the user you just want to show one in a different way. Somehow I find there is an impedance between `__unicode__` and the outer world.

I've named the method `__stream__` so that it looks like `__unicode__`, but feel free to rename it if you don't like it.

Cheers,
Miguel